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?
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;
}
This way in css
You have to include the Effects Core in the jQuery UI download builder to solve this error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With