I have a table that reveals further details of a record when its is clicked. The details reside in a child div with the class 'description'. I've got the exposure toggling just fine, but I would like to avoid having the click function called on elements that have already been exposed (i.e. i don't want to re-display what's already being displayed).
I've tried .bind and .live with no luck. Basically, I'm hoping there's some way to allow the new class assignment to be 'activated' in the DOM.
Thanks in advance for your help!
jQUERY
$(document).ready(function(){
$('#libraryBrowser tbody tr:not(.exposed)').click(function(){
$('.exposed').slideUp('fast'); //hide previously shown element
$(this).find('div.description').slideToggle('slow').addClass('exposed'); //show selected item's description, flag exposure
});
});