jQuery: detecting new elements with the MutationObserver object A common problem in JavaScript and jQuery regards the insertion of new elements: how can we detect when a new element has been inserted into the document? The insertion of new elements that we don't know in advance could be controlled in the past through the DOMNodeInserted event: $( document ).on( "DOMNodeInserted", function( e ) { c