[jQuery] [JQuery Plugin - Validate] Form element was modified before and inside submitHandler

2009-10-23 Thread mathie
Does submitHandler add/modify the form element? I have a simple form with a button and a required checkbox. Form element outside of submitHandler: var_dump($('#formid').get(0).myButton); => a regular HTMLButtonElement as expected Form element inside of submitHandler: submitHandler: function(f) {

[jQuery] [JQuery Plugin Validate] How to know which button is clicked

2009-10-23 Thread mathie
Hello, I have a form with two buttons: "Delete" and "View". A checkbox is required for all actions. Validation happens when a button is clicked. If it's "View", it is just a normal operation. However, if it's "Delete", if the form is valid, it then needs to show a confirmation before form submiss

[jQuery] nth-child() vs. even/odd

2008-08-23 Thread mathie
Are they equivalent to each other? Ignoring the fact that one is counting from 0 and one from 1. This does not work (use the same CSS class for subsequent rows): $("#tableid tbody tr:even").addClass("even"); $("#tableid tbody tr:odd").addClass("odd"); But this does work: $("#tableid tbody tr:nt