Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: jQuery.easing[this.easing] is not a function [duplicate]

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?

like image 214
user3133976 Avatar asked Jan 30 '14 06:01

user3133976


2 Answers

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

like image 106
Arthur Yakovlev Avatar answered Nov 01 '22 12:11

Arthur Yakovlev


You have to include the Effects Core in the jQuery UI download builder to solve this error.

like image 37
silkfire Avatar answered Nov 01 '22 12:11

silkfire