> I was wondering having done:
> 
> $(".foo").click(function (e) {alert ("foo");});
> 
> Can I force the click event to fire manually, or do I resort to
> 
> var x = function (e) {alert ("foo");}
> $("#foo").click(x);
> ele = $("#foo").get(0)
> x.call( ele, {target:ele});

You can use either of these (they do the same thing):

  $("#foo").click();

  $("#foo").trigger("click");

-Mike


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to