我想创建锚链接滚动,并与引导类型错误:m.easing [this.easing]是不是一个函数错误
$(window).scroll(function(){
if ($(window).scrollTop() >= 100) {
$('#header').addClass('fixed');
}
else {
$('#header').removeClass('fixed').fadeOut("slow", 100);
}
$('[data-toggle="tooltip"]').tooltip();
});
$(function() {
$('a.page-scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo');
event.preventDefault();
});
});
$(function() {
$('a.scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo');
event.preventDefault();
});
});
工具提示显示,但我在控制台 收到此错误类型错误:m.easing [this.easing]不是函数
演示链接 http://itracktraining.com/bb2/index.html
错误仍然存在,甚至根据你做的更改后.... –
@DivyaSharma请参阅我的更新答案,其中包括对使用fadeOut'的'解释。 – shennan