Merge pull request #223 from ramnathv/gh-pages

Scroll page to top when prev/next clicked.
This commit is contained in:
Joe Cheng
2013-09-09 08:51:41 -07:00

View File

@@ -457,11 +457,13 @@ manageNextPrev();
$('a#next').click(function(e) {
e.preventDefault();
location.href = $('.nav li.active').nextAll('li:not(.nav-header)').first().find('a').attr('href');
$('html,body').scrollTop(0);
manageNextPrev();
});
$('a#previous').click(function(e) {
e.preventDefault();
location.href = $('.nav li.active').prevAll('li:not(.nav-header)').first().find('a').attr('href');
$('html,body').scrollTop(0);
manageNextPrev();
});