I’ve had a look round but there doesn’t seem to be anything linking the 2 jquery functions in question.
Moreover, any bug fixes that allows this to work on ipad (i.e swiping instead of scrolling that highlights the relevant menu header when on that section of the page) would be great find.
Any help would be greatly appreciated, fairly newbie at Javascript/jquery.
EXAMPLE:
http://jqueryfordesigners.com/scroll-linked-navigation/
but with animate or easing added in there..
$(window).scroll(function () {
var inview = '#' + $("#content_about > section > h1:in-viewport:first").parent().attr('id'),
$link = $('.linked_nav a').filter('[hash=' + inview + ']');
if ($link.length && !$link.is('.selected')) {
$('.linked_nav a').removeClass('selected');
$link.addClass('selected');
}
});
WITH ..(possibly):
$('html,body').animate({scrollTop: $("#"+id).offset().top-120},'slow');
http://imakewebthings.com/jquery-waypoints/
Jquery Waypoints covers all issues except touchwipe support which can be integrated using links and info on here:
Default wipe for some wipes using jQuery touchwipe