Revision: 46834
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 26, 2011 08:03 by inreflection7
Initial Code
// Expand Tables
$(".expandTable").toggle(
function(){
$(this).closest('.tableSection').find('.tradeTable').fadeIn();
$(this).closest('.tableSection').find('.arrow').html('↓');
},
function(){
$(this).closest('.tableSection').find('.tradeTable').fadeOut();
$(this).closest('.tableSection').find('.arrow').html('→');
}
);
Initial URL
Initial Description
.closest and .find are very useful - surprised I haven't heard of them before.
Initial Title
.closest and .find in jQuery
Initial Tags
find
Initial Language
jQuery