I have a page with a list of elements (elements) of elements that are drawn dynamically, so live . When the user rolls the element, I would like them to switch to the "on" class, and then when they are collapsed (mouseout), the element returns to its normal state. Elements are turned on with the line of code below, but not turned off. Suggestions?
$('.item').live('mouseover', function(){$(this).switchClass('item','item_on', 500);});
$('.item_on').live('mouseout', function(){$(this).switchClass('item_on','item', 500);});
Thanks!
source
share