krak3n/jQuery-Bubble
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
README ====== jQuery bubble is a jQuery plugin that allows you to traverse up the DOM tree much like jQuery's $.find() method which traverses down the DOM tree. Usage ===== 1. Include jquery and bubble in your HTML document. 2. You can then use the following syntax: var element = $('.element').bubble('.element_higher_up_the_tree'); Example ======= HTML: <form method="post" action="some/url/"> <label for="id_name">Name:</label> <input type="textfield" id="id_name" name="id_name" /> <a href="#" class="custom-button">Submit form</a> </form> Javascript: $(document).ready(function() { $('.custom-button').bind('click', function() { $(this).bubble('form').submit(); }); }) Licence ======= Copyright (c) 2011 Christopher John Reeves Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
About
Bubble allows you to bubble up the DOM tree much like the jQuery find() method which bubbles down the DOM tree.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published