Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Call a function after form reset
- <form>
- <div id="capture_bubble">
- <input type="text"><input type="reset">
- </div>
- </form>
- (function($) {
- $(function() {
- $('#capture_bubble').live('click', function(){
- console.debug('capture_bubble');
- alert('capture_bubble')
- })
- $("input[type='reset']").live('click', function(){
- this.form.reset(); // forcing reset event
- console.debug('reset');
- alert('reset')
- });
- });
- })(jQuery);
- function updateForm()
- {
- $.each($('form').find(":input"), function(){
- $.uniform.update($(this));
- });
- }
- <form onReset="updateForm();">
- $('form').bind('reset', function() {
- $.each($(this).find(":input"), function(){
- $.uniform.update($(this));
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment