Event Toggle v0.5
A little and simple plugin for toggling between unlimited functions assigned to an event.
Details
- Author
- Daniel Pisanec
- Current version
- v0.5
- GitHub
- yacchatta/EventToggle
- Downloads
- 1815
- Category
- Utilities
- Tags
- Report
- GitHub Issues
Releases
How to use
new EventToggle(element, functions, options);
Arbitrary Section
SYNTAX:
new EventToggle(element, functions[, options]);
ARGUMENTS:
- element (element) an element or set of elements
- functions (array) an array of function to toggle between
- options (object, optional) option object
OPTIONS:
event_name (string) name of the event to execute, eg. 'click', 'mouseenter',...
DESCRIPTION:
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
Discuss
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