Skip to content

Instantly share code, notes, and snippets.

@Lasha
Created March 2, 2012 00:57
Show Gist options
  • Save Lasha/1954406 to your computer and use it in GitHub Desktop.
Save Lasha/1954406 to your computer and use it in GitHub Desktop.
jQuery Waypoints plugin - Single call for multiple tables with the same class
$(".events-table").each(function(index) {
$(this).waypoint(function(event, direction) {
if (index === 0) {
$("#events-table-0").toggle();
} else if (index === 1) {
$("#events-table-0").toggle();
$("#events-table-1").toggle();
}
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment