The reason it is 'scrolling' to the top is not because of the return false
. It's because in this code:
//On Click Event
$("ul.tabs_ip li").click(function() {
$("ul.tabs_ip li").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
////////////////RIGHT HERE
$(".tab_content_ip").hide(); //Hide all tab content
var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active ID content
return false;
});
You are making the page significantly shorter by hiding that DIV
, thus giving the appearance that you are 'scrolling' to the top of the page. If you were to give that DIV
a min-height: 400px;
or something like that, you wouldn't get the jogging about. Set the min-height to a reasonable number for your content.
EDIT:
Add this CSS to your .css file:
.tab_content_ip{
min-height: 400px;
}