-
Notifications
You must be signed in to change notification settings - Fork 0
ocean-internet/toggleLoad
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
******************************************************************************** * toggleLoad.js - Jquery Plugin * ******************************************************************************** JQuery Plugin - adds (& deletes) a remote snippet of HTML on clicking a link ******************************************************************************** * Options * ******************************************************************************** attr: 'href', data: null, addLinkClass: 'add', addLinkHtml: '+', removeLinkClass: 'remove', removeLinkHtml: '-', addElement: '<div class="clearfix" />', addElementClass: 'toggleLoad', elementAdded: function (element) { $(element).effect('highlight'); }, elementRemoved: function (parent) { $(parent) .effect('highlight'); } ******************************************************************************** * Usage * ******************************************************************************** <ol> <li class="menu"><a href="/subMenu1.html" class="add">+</a> Top</li> <li class="menu"><a href="/subMenu2.html" class="add">+</a> Menu</li> <li class="menu"><a href="/subMenu3.html" class="add">+</a> Level</li> </ol> <script> $(function () { $('.menu .add').toggleLoad(); }); </script> ******************************************************************************** * Todo * ******************************************************************************** @todo add unit tests @todo add docs
About
JQuery Plugin - adds (& deletes) a remote snippet of HTML on clicking a link
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published