Return to Snippet

Revision: 46834
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