If you use jQuery this code should be self-explanatory:
//fade the show-data class in or out of view
if($(this).hasClass('open')){
$(obj).find('.show-data').hide(250);
}else{
$(obj).find('.show-data').show(250);
}
what I'm wondering if there's some way to do this in fewer lines as follows:
$(obj).find('.show-data').fn[$(this).hasClass('open') ? 'hide' : 'show'](250);
Thanks
.toggle()that takes ashowOrHideparameter doesn't also allow a duration.