I'm having problems with localscroll - I have a fixed header element that appears after 100 or so pixels from the top. When the user clicks on the nav item it scrolls to the correct position but then it when I try to click on another menu item it won't move unless I move the page very slightly.
This only occurs on the iPad - it works fine in desktop browsers.
Does anyone have any ideas?
var sections = $('section,footer'),
links = $('nav a');
$(window).scroll(function() {
var currentPosition = $(this).scrollTop();
links.removeClass('selected');
sections.each(function() {
var top = $(this).offset().top - 100,
bottom = top + $(this).height();
if (currentPosition >= top && currentPosition <= bottom) {
$('a[href="#' + this.id + '"]').addClass('selected');
}
if ($(window).scrollTop() + $(window).height() == $(document).height()) {
links.removeClass('selected');
$('.last a').addClass('selected');
}
});
});
$.localScroll();
Managed to find the fix via here: https://gist.github.com/mckamey/1e661854044177a95064