Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. // Only works for existing button.remove elements
  2. $('#broken button.remove').on('click', function(){
  3. $(this).remove();
  4. });
  5.  
  6. // Works for existing button.remove elements, and new ones added dynamically
  7. $('#working').on('click', 'button.remove', function(){
  8. $(this).remove();
  9. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement