How to use easing in the jQuery plugin jQuery.ScrollTo?

前端 未结 2 1627
后悔当初
后悔当初 2021-02-19 22:35

The website only mentions the easing option:

# easing: Name of the easing equation.

But there\'s no example.

How to use this feature?

2条回答
  •  时光说笑
    2021-02-19 22:59

    You can find the default usage here: http://gsgd.co.uk/sandbox/jquery/easing/

    Here is an example of 'easeOutQuad':

    function (){
     jQuery.easing.def = 'easeOutQuad';
    
     $('#options-examples').on('click','a', function() {
       $('#another-option-examples').slideToggle(1000);
       return false;
     });
    }
    

提交回复
热议问题