Skip to content

Instantly share code, notes, and snippets.

@saltcod
Created March 17, 2012 16:11
Show Gist options
  • Save saltcod/2061561 to your computer and use it in GitHub Desktop.
Save saltcod/2061561 to your computer and use it in GitHub Desktop.
Menu panels
// Paginate the portfolio
$('ul#menu-portfolio > li:gt(11)').hide();
$('.prev').click(function() {
var first = $('ul#menu-portfolio').children('li:visible:first');
first.prevAll(':lt(12)').show('fast');
first.prev().nextAll().hide();
});
$('.next').click(function() {
var last = $('ul#menu-portfolio').children('li:visible:last');
last.nextAll(':lt(12)').show('fast');
last.next().prevAll().hide();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment