Jquery load problem, unable to trigger a function on page load
I'm using someone's Jquery code to make a page element pulse. the code works absolutely fine if I want the element to pulse when it is clicked upon but I cannot figure out how to trigger the function when the page loads (i.e. it just starts pulsing you don't have to click on it)
I'm sure it's very straight forward, but I'm new to Jquery and I can't figure it out; I thought replacing click with load would do it but alas no.
$(document).ready(function() { $("div.effect") .hover(function() { $(this).addClass("hover"); }, function() { $(this).removeClass("hover"); }) ; var effect = function(el, n, o) { $.extend(o, { easing: "easeOutQuint" }); $(el).bind("click", function() { $(this).addClass("current").hide(n, o, 1500, function() { var self = this; window.setTimeout(function() { $(self).show(n, o, 1500, function() { $(this).removeClass("current"); }); },500); }); }); }; effect("#pulsate", "pulsate", { times: 4 }); $("#transfer").bind("click", function() { $(this).addClass("current").effect("transfer", { to: "div:eq(0)" }, 1000, function() { $(this).removeClass("current"); }); });});on the page: <div class="effect" id="pulsate"> <p>Pulsate 2 times</p> </div>like i say it works when it's clicked on but I would like to work automatically when the page loads.
$('pulsate').click()