Skip to content

Instantly share code, notes, and snippets.

@gpbmike
Forked from snide/gist:722735
Created December 1, 2010 00:53
Show Gist options
  • Save gpbmike/722738 to your computer and use it in GitHub Desktop.
Save gpbmike/722738 to your computer and use it in GitHub Desktop.
<a href="#js_table_1" class="toggle-table">table 1</a>
$('.toggle-table').click(function(e) {
e.preventDefault();
var table = $($(this).attr('href'));
if (table.is(':visible')) {
table.fadeOut('slow')
} else {
table.fadeIn('slow')
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment