Tag Archives: jQuery

jsTree with support for label toggle_node action AND leaf HREF click actions

You can enable node opening/closing on the label click using the UI plugin and binding the select_node.jstree event to your tree. A consequence of this method means that any leafs with a valid HREF attribute will no longer click through as expected. The method below demonstrates how to have a toggle action on clicking a [...]

Posted in JavaScript | Also tagged , | 2 Comments

Control which submit button the jQuery form validation plugin fires with

Consider the following form. <form> <input type="text" name="mytext" /> <button type="submit" name="next">next</button> <button type="submit" name="back">back</button> </form> In this case, we only want the jQuery validation plugin to do its thing when the ‘next’ button is clicked. If the back button is clicked we do not care about the validation. The solution is simple. Add the [...]

Posted in JavaScript | Also tagged | 2 Comments