Konstantin Mokhov Konstantin Mokhov - 1 year ago 68
jQuery Question

event, when div is changed

I have some DOM elements, like this

<div class='parent'>

How I can track event, when 'parent' div has changed? As example I'm add
programmatically, with
, or i'm drag div3 to 'parent' div.

Answer Source

try this:

$('.parent').on("DOMNodeInserted", function(){
  //your code