Reputation: 31
I'm developing a new version of my website right now.
I use the class page-scroll (I think it's linked to a JavaScript) to make a scroll to a section.
Until yesterday, the menu buttons and the arrows linking to the specific sections worked fine. If you clicked them, the site scrolled to the section. But now, it jumps to the section.
The code of the menu bar:
<li>
<a class="page-scroll" href="#s1"> <span class="navtext"> About Me </span> </a>
</li>
<li>
<a class="page-scroll" href="#s3"> <span class="navtext"> Contact </span> </a>
</li>
I think it's linked to this:
function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo');
event.preventDefault();
}
If you need more info you can use the web inspector of your browser.
Upvotes: 0
Views: 5921
Reputation: 21653
You're calling jQuery twice on your page: once locally and once at the very end with a CDN. Remove the 1.7.2 CDN and it should work.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
Upvotes: 1