Example:
$(X).bind('click', function() { alert( 'Two' ); });
$(X).bind('click', function() { alert( 'Three' ); });
$(X).bind('click', function() { alert( 'Four' ); });
$(X).bind('click', function() { alert( 'Five' ); });
**$(X).bindUp('click', function() { alert( 'One' ); });**
When the user click X the output should be:
alert( 'One' );
alert( 'Two' );
alert( 'Three' );
alert( 'Four' );
alert( 'Five' );
It’s possible??
Thanks………………….
For simple cases, I think you could do something like this:
Example: http://jsfiddle.net/uEEzt/2/
When you use this
.bindUp()plugin, it just does a normal.bind(), but then removes the event from the end, and places it at the beginning.Again, this would be for simple cases only.
EDIT: It should be simple to make this work with multiple events, but don’t try to use it with
hover.EDIT: Here’s a version that works with multiple (space separated) events (again, don’t use with
hover):Example: http://jsfiddle.net/uEEzt/4/
EDIT: Fixed mistake in “multiple” version where
lenvariable was not reset.