Example #13: quick image selection
In this example the user can choose an image by clicking on it. He can change his choice as often as he wants.
The "ready" button will always disable if last image is unselected.
$("#choices").on('click','img') .add('.selected').toggleClass('selected') .$('#result').attr('disabled',false) ._.on('click','img.selected') .$('#result').attr('disabled',true);
Choose your preferred image:
Other examples with context switch
Other examples with inline attached events
- Example #3: a simple inline click handler
- Example #4: blinking a given number of times on click
- Example #9: generating password with fake progress
- Example #10: fading submenus with user friendly timeouts
- Example #12: cyclic button clicks
- Example #14: wait a timeout after each click before blinking
- Example #18: falling little boxes