Well let's see - that's not the tab code. There are no $('#myTabs a'). But there does appear to be a conflict. Focus only on the 9 scroll links for the scroll initialization. Use this (three additions/changes - red) instead of the current smoothscroll.js:
Code:
$('a.drill-btn-tab[href*=#]:not([href=#])').click(function(e) {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|| location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
e.preventDefault();
}
}
});
The browser cache may have to be cleared and/or the page refreshed to see changes.
Notes: The preventDefault() method is preferable to return false as it will not prevent other events from working on these elements (that was the main problem). However, assigning both behaviors to the bottom tabs has other undesirable consequences. USE ONLY ONE FIX OR THE OTHER FOR THIS, but alternatively one could eliminate the other hash links (might be preferable if other scroll links with different class name(s) are used in the future):
Code:
$('a[href*=#]:not(.service-name, [href=#])').click(function(e) {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|| location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
e.preventDefault();
}
}
});
Bookmarks