buongiorno,
come mai questo sito http://www.thejoke.it/siam/ visto su firefox è perfetto.... mentre sugli altri browser tende a scattare...?
questo è lo script che uso
codice:<script type="text/javascript"> $(function() { $('ul.nav a.vertical ').bind('click',function(event){ var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top }, 1500,'easeInOutExpo'); /* if you don't want to use the easing effects: $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top }, 1000); */ event.preventDefault(); }); $('ul.nav a.horizontal ').bind('click',function(event){ var $anchor = $(this); /* if you want to use one of the easing effects: $('html, body').stop().animate({ scrollLeft: $($anchor.attr('href')).offset().left }, 1500,'easeInOutExpo'); */ $('html, body').stop().animate({ scrollLeft: $($anchor.attr('href')).offset().left }, 1000); event.preventDefault(); }); $("ul.nav a[href=#section2]").trigger("click"); }); </script>![]()

Rispondi quotando