How can I detect when a new element has been added to the document in jquery ?
Explanation: I want to know when an element with class \"column-header\" has been adde
try this...
if($('.column-header')){ //do something... }
or you can also do something like this..it will be more generic
jQuery.exists = function(selector) { return ($(selector).length > 0); } if ($(selector).exists()) { // Do something }