JQuery event pass data


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var e = jQuery.Event("click");
  2. e.user = "foo";
  3. e.pass = "bar";
  4. $("a").trigger(e);
  5.  
  6.  
  7. // or the shortcut
  8. $("a").trigger({
  9. type:"click",
  10. user:"username",
  11. pass:"password"
  12. });

URL: http://jquery-howto.blogspot.com/2009/01/working-with-jquery-13-new-event-object.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.