Earlier I have covered few articles related to event binding using MooTools. Here you can see the basic things which we need to know for MooTools.
Upto now I have explained about assigning an events. When you assign event then it will remain assigned untill you remove the events.
For example, If I have assigned click event then it will executed every time you click on that element. This is the comman thing. But what if you want to click only once?
Yes this is what today’s article is about. I will show you the trick with which you can assign event but that only once using MooTools.
Make sure that you have included MooTools More to make this happen.
Normally we can assign click events using the event name “click“, but when you want to make it only once then that event should looks like “click:once“.
I have prepared live demo for this also but before this have a look at this code block for the same.
Have a look at live demo for this trick also.
Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.
View all posts by: Avinash