Attenuation with .hide ('slide')?

Can this be facilitated:

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

This is very nervous at the moment, as it moves, maybe .. 100 - 500 pixels (depending on the content). I searched google and most people say they use mitigation, but looking at the documentation, I don't see properties for relief.

+7
source share
3 answers

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

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

Check out the relief documentation

Here is an example

+7
source

Right first with

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

http://docs.jquery.com/UI/Effects/Slide

See below page

http://docs.jquery.com/UI/Effects/Slide

OR

you can use animate

http://api.jquery.com/animate/

Also you can find easing cheat

For example.

http://gsgd.co.uk/sandbox/jquery/easing/

http://jqueryui.com/resources/demos/effect/easing.html

http://easings.net/

0
source

You can download the jQuery easing plugin from http://gsgd.co.uk/sandbox/jquery/easing , which provides smoother animations than the standard ones included in jQuery. You can then easily customize your global attenuation animation using the following code:

 jQuery.easing.def = "easeInOutExpo"; 

You can, of course, choose whichever facilitating animation you prefer. This will affect all your jQuery animations on the page, which is not so bad if you are looking for consistency.

0
source

All Articles