Created
November 6, 2012 16:55
Initially show only X table rows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var numShown = 15; // Initial rows shown & index | |
// Hide rows and add clickable div | |
$('.cinematiclist').find('tr:gt(' + (numShown - 1) + ')').hide().end().append('<tr id="cinematicmore"><td colspan="4" style="cursor:pointer; text-align:center;">Zeige alle</td></tr>'); | |
// onclick remove trigger an show full table | |
$('#cinematicmore').click(function(){ | |
$('#cinematicmore').remove(); | |
// Show all | |
$('.cinematiclist').find('tr').show(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment