开发者

Apply easing on jquery ui show?

开发者 https://www.devze.com 2023-02-26 08:09 出处:网络
I\'m trying to apply easing on a jquery ui show effect. Ideally the api would look something like this:

I'm trying to apply easing on a jquery ui show effect. Ideally the api would look something like this:

$(this).show('scale', {
  duration: 1000,
  easing: 'easeOutBounce', 
});

Currently the element is at display:none. I need to show it with the scaling effect and have an easing.

Do I have to separate the commands or is there something like this that woul开发者_如何学Pythond work?

Thanks.


I've tested it on jsfiddle and works:

$('.div1').show('scale', {
  duration: 1000,
  easing: 'easeOutBounce', 
});​

http://jsfiddle.net/tenshimsm/AUM6d/1/


You need to remove comma (,) after easeOutBounce then it should work

$(this).show('scale', {
  duration: 1000,
  easing: 'easeOutBounce' 
});


Check firebug, when using code example it adds some hidden characters:

            jQuery('#search-container .fa-search').toggle('scale', {duration: 1000,easing: 'easeOutBounce'});​
            jQuery('#homepage-search').toggle('scale', {duration: 1000,easing: 'easeOutBounce'});​
0

精彩评论

暂无评论...
验证码 换一张
取 消