Search code examples
javascriptjqueryjquery-effects

Easing with .hide('slide')?


Is it possible to have easing with this:

('#sideBar').hide('slide', {direction: 'right' }, 
    800, function(){...});

At the moment it is very jittery as it is moving maybe.. 100 - 500 pixels (depending on content). I have been looking google and most people say to use easing, but when looking at the documentation i cannot see a property for easing.


Solution

  • You can specify the easing property in the options object (the second argument):

    $('#sideBar').hide('slide', { direction: 'right', easing: 'easeOutBounce' }, 
        800, function(){...});
    

    Check out the easing documentation

    Here's an example