My website has a full-width slider as the main background and I am using jQuery to show or hide divs depending on the clicked link. However, when some sections are longer than the initial view, my page automatically scrolls to the bottom after a click. How can I prevent this automatic scrolling to the bottom?
I am using Bootstrap and the jQuery Vegas slider plugin for the full-width slider.
Here is the JavaScript code snippet:
$(function() {
$("nav li a").click(function() {
$(".wrapper").addClass("hide")
var page = $(this).attr("href")
$(page).fadeIn("slow").toggleClass("hide")
})
});