I’m trying to figure out why this code
$(document).ready(function() {
$(".image2_template").effect( "pulsate",
{times:5}, 3000 );
});
doesn’t work yet this
$(document).ready(function() {
$("#text4").click(function(){
$(".image2_template").effect( "pulsate",
{times:5}, 3000 );
});
});
work fine. Does the pulsate effect have to be triggered by a click? I want it to run on the page load.
UPDATE:
After listening to everyone’s helpful suggestions I found out that the element is recognized as an object, but it is says there are no matched DOM elements when I use bjorn’s mwthod. How can I resolve this issue?
No, you do not have to trigger it by an event such as click.
It should work as well just by calling the method.
Here is a live example of your working script.