Javascript TypeError:jQuery.easing[this.easing]不是一个函数
我需要给我的jQuery链接添加一个效果,但它只在Min1.7.1中起作用,我还有一个代码只在1.10.2中起作用 此代码仅适用于1.10.2Javascript TypeError:jQuery.easing[this.easing]不是一个函数,javascript,jquery,Javascript,Jquery,我需要给我的jQuery链接添加一个效果,但它只在Min1.7.1中起作用,我还有一个代码只在1.10.2中起作用 此代码仅适用于1.10.2 $(document).ready(function(){ var menu = document.querySelector('#menu-bar-wrapper'); var origOffsetY = menu.offsetTop; function scroll () { if ($(window).scr
$(document).ready(function(){
var menu = document.querySelector('#menu-bar-wrapper');
var origOffsetY = menu.offsetTop;
function scroll () {
if ($(window).scrollTop() >= origOffsetY) {
$('#menu-bar-wrapper').addClass('sticky');
$('#latest-wrapper').addClass('menu-padding');
} else {
$('#menu-bar-wrapper').removeClass('sticky');
$('#latest-wrapper').removeClass('menu-padding');
}
}
document.onscroll = scroll;
});
这项工作在1.7.1中:
$(document).ready(function(){
$('.block-content ul.menu li').hover(function(event) {
$(this).stop().animate({ marginRight: "5px" }, {duration: 'slow',easing: 'easeOutElastic'});
},function(){
$(this).stop().animate({ marginRight: "0px" }, {duration: 'slow',easing: 'easeOutElastic'});
});
});
当我打开我的站点时,这两个代码不起作用,并显示此错误:
TypeError:jQuery.easing[this.easing]不是一个函数
percent,this.options.duration*percent,0,1,this.options.duration
我能做些什么来解决它
a{
color: #666;
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
}
a:hover{
cursor: pointer;
color: #000;
text-decoration: none;
}
这样,在css中,您必须在jQuery UI下载生成器中包含效果核心,以解决此错误