Guest User

Untitled

a guest
May 7th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. Can I add an event to an object before it is created?
  2. <a class="editLink" href="/location/Edit?city=05">Edit</a>
  3.  
  4. $(".editLink").button();
  5. $(".editLink").click(function () {
  6. alert('edit link');
  7. return false;
  8. });
  9.  
  10. $(".editLink").button();
  11.  
  12. $(document).on('click', '.editLink', function() {
  13. alert('edit link');
  14. return false;
  15. });
  16.  
  17. $('body').on('click', '.editLink', function() {
  18. alert('edit link');
  19. return false;
  20. });
Advertisement
Add Comment
Please, Sign In to add comment