nnattawat / flip

A lightweight jQuery plugin to make 3D card flipping animation
Other
626 stars 312 forks source link

Option to unregister flip #49

Closed c-a-m closed 8 years ago

c-a-m commented 9 years ago

I've been having fun with flip. Thanks!

I've built a simple memory game with flip. Each tile is registered to flip on a click or tap. But once a match is found, I'd like to turn off flip. I attempted to call $('#tileId').flip( { trigger: 'manual' } ) but that is my best guess as to how to do it. Any suggestions?

JemarJones commented 9 years ago

In the future flip will work the way you've just described. A little busy lately but I will get around to it soon hopefully.

nnattawat commented 9 years ago

As @JemarJones, we can add unbind feature in the next release. For now, you need to { trigger: manual } and control the interaction yourself or you can try unbind the event that you use in the trigger from your DOM, for example, if you use click you can do $('#tileld').unbind('click');. However, this is a bit tricky as it will unbind all click events from your DOM (not just the flip one).

c-a-m commented 9 years ago

Thanks for the tip. I'll do as suggested until some future release. Thanks again for the fun plugin!

nnattawat commented 8 years ago

Flip can be easily unbind from version v1.0.19 once #68 is merged