We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could I suggest you these modifications, in order to use reset button in forms:
if( $this.attr('type') == 'checkbox') { var defaultState = ''; if( $this.is(':checked') ) { $this.parent().addClass(defaultOpt.checkedCls); defaultState = 'checked'; } var item = $this.addClass(defaultOpt.hideCls).wrap(wrapTag); item.change(function() { console.log("EZMARK checkbox changed"); if( $(this).is(':checked') ) { $(this).parent().addClass(defaultOpt.checkedCls); } else { $(this).parent().removeClass(defaultOpt.checkedCls); } }); if(item.parents("form").find("[type=reset]").length>0){ item.parents("form").find("[type=reset]").click(function(){ console.log("EZMARK form reset"); if(defaultState=='checked'){ item.parent().addClass(defaultOpt.checkedCls); }else{ item.parent().removeClass(defaultOpt.checkedCls); } }); } } else if( $this.attr('type') == 'radio') { var defaultState = ''; if( $this.is(':checked') ) { $this.parent().addClass(defaultOpt.selectedCls); defaultState = 'checked'; } var item = $this.addClass(defaultOpt.hideCls).wrap(wrapTag); item.change(function() { console.log("EZMARK radio changed"); // radio button may contain groups! - so check for group $('input[name="'+$(this).attr('name')+'"]').each(function() { if( $(this).is(':checked') ) { $(this).parent().addClass(defaultOpt.selectedCls); } else { $(this).parent().removeClass(defaultOpt.selectedCls); } }); }); if(item.parents("form").find("[type=reset]").length>0){ item.parents("form").find("[type=reset]").click(function(){ console.log("EZMARK form reset"); if(defaultState=='checked'){ item.parent().addClass(defaultOpt.selectedCls); }else{ item.parent().removeClass(defaultOpt.selectedCls); } }); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Could I suggest you these modifications, in order to use reset button in forms:
The text was updated successfully, but these errors were encountered: