Search code examples
jqueryjquery-uijquery-animatejquery-easing

jquery easeOutBounce horizontal


I'm trying to do a easeOutBounce horizontal animation, but all i succeed to do is vertical easeOutBounce, with this : $('#tester').slideToggle(1000,'easeOutBounce');

here is my jsfiddle : https://jsfiddle.net/newzy08/xpvt214o/372035/

I haven't seen any easeOutBounce effect with jquery slide() function...

What may i change in my code for switching from vertical to horizontal easeOutBounce ?

Thanks !


Solution

  • use this with a bit of change in your css

    $('#tester').animate({
      width: '300px'
    }, {
      duration: 1000,
      specialEasing: {
        width: "easeOutBounce"
      }
    });
    

    https://jsfiddle.net/hnpt4xgb/