Guest User

Untitled

a guest
Dec 18th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. $(document).on('DOMNodeInserted', function (e) {
  2. if ($('.new')) {
  3. $('.but').attr("disabled", true);
  4. alert('!!!');
  5. }
  6. });
  7.  
  8. $(document).on('DOMNodeRemoved', function (e) {
  9. var $element = $(e.target).find('.new');
  10. if (!$element.length) {
  11. $('.but').attr("disabled", false);
  12. alert("111");
  13. }
  14. });
Add Comment
Please, Sign In to add comment