Hi all, this ones had me stumbling for a while now... how do I get a hover function thats bound to a specific group of elements eg:
$('#bar .foo').hover(function(){ $(this).addClass('greyHover'); }, function(){ $(this).removeClass('greyHover') }); to reset itself when another click function is fired, i.e. reassess the array of DOM elements it apples itself to, and stop applying to those that no longer fall under $(#bar .foo) This is so when the click function is fired, it removes the class .foo from the element, thus the hover function doesn't apply to it anymore.