Bug Tracker

Changes between Initial Version and Version 1 of Ticket #11588, comment 1


Ignore:
Timestamp:
Apr 13, 2012, 7:51:06 AM (10 years ago)
Author:
sindresorhus
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11588, comment 1

    initial v1  
    1 That's because the element doesn't exist when you bind to it.
     1That's because the element doesn't exist when you bind to it. The normal .on() works like the old .bind().
    22
    3 Either use
    4 event delegation: $(".bet").on('click', ".addbetbutton"
    5 or live using .on(): $(document).on('click', ".addbetbutton"
     3Either use
     4
     5event delegation: $(".bet").on('click', ".addbetbutton", function() {});
     6
     7or live using .on(): $(document).on('click', ".addbetbutton", function() {});