jQuery Hook allows you to separate interaction from presentation. By using HTML's data attribute you no long have to depend on CSS classes.
Based on Will Boyd's Sitepoint article
Repurposed with permission by Duncan Heal
Simply link to jQuery and jQuery.hook, add a data-hook attribute to your element and select away:
<button data-hook="nav-menu-toggle">Toggle Nav Menu</button>
$.hook('nav-menu-toggle').on('click', function() {
$.hook('nav-menu').toggle();
});
[MIT License]: http://mit-license.org/