Last active
December 21, 2015 20:19
-
-
Save andershaig/6360305 to your computer and use it in GitHub Desktop.
Stories Plugin - Limit Visible Entries
This file contains hidden or 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
// Hide all stories except for the first X | |
// (0-based index - e.g. subtract 1 from the number of answers you want to show) | |
$('.stories_recent_activity ol li:gt(X)').hide(); | |
// Examples | |
// Show only 1 item | |
$(document).ready( function () { | |
$('.stories_recent_activity ol li:gt(0)').hide(); | |
}); | |
// Show 5 items | |
$(document).ready( function () { | |
$('.stories_recent_activity ol li:gt(4)').hide(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment