开发者

What is going on with this jquery animate effect?

开发者 https://www.devze.com 2023-03-25 12:46 出处:网络
I can\'t get the jQuery animate effect to work.What is strange is when I add in a .cli开发者_JS百科ck function it works fine.

I can't get the jQuery animate effect to work. What is strange is when I add in a .cli开发者_JS百科ck function it works fine.

Can anyone suggest a solution or work around to get this effect to run on the page load?

$(document).ready(function() {
    var image2_template = $(".image2_template");
    console.log(image2_template.length);
    $(image2_template).effect( "pulsate", 
        {times:5}, 3000 );
});

The console returns a value of 1 so .image2_template is an object, I have no idea why the animation won't fire.


You're probably not including jQuery UI.

See http://jsfiddle.net/tusbar/Xgftz/ for a working demo.

0

精彩评论

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