This should work for all elements regardless of when they are generated.
if($('some_element').length == 0) {
}
write your code in the ajax callback functions and it should work fine.
This should work for all elements regardless of when they are generated.
if($('some_element').length == 0) {
}
write your code in the ajax callback functions and it should work fine.