Event Toggle v0.5
A little and simple plugin for toggling between unlimited functions assigned to an event.
How to use
new EventToggle(element, functions, options);
new EventToggle(element, functions[, options]);
- element (element) an element or set of elements
- functions (array) an array of function to toggle between
- options (object, optional) option object
event_name (string) name of the event to execute, eg. 'click', 'mouseenter',...
The first time the event is triggered, the first function of the function set will be executed. And each time the event is triggered again, the next function will be executed. When the last function was reached, it begins at the first function all over again.
TODO: - add possibility change all or a single function afterwards - add possibility to remove a function
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.blog comments powered by Disqus