conflict tab and smooth scroll scripts
Hey all.
There seems to be a conflict between these two scripts on the same page.
This is the tab script
Code:
$('#myTabs a').click(function (e) {
e.preventDefault()
$(this).tab('show')
})
And this is the smooth scroll script
Code:
$('a[href*=#]:not([href=#])').click(function() {
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);
return false;
}
}
});
Can anyone help me out so I can have the two scripts running on the same page, please?
Thanks!