I need to add an effect to my link with jQuery but it only works in min 1.7.1, and I have another code that only worked in 1.10.2.
This code works only in 1.10.2
$(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;
});
and this work in 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'});
});
});
When I open my site these two codes don't work and show me this error :
TypeError: jQuery.easing[this.easing] is not a function
percent, this.options.duration * percent, 0, 1, this.options.duration
What can I do to solved it?