jquery check if element is in DOM

jquery check if element is in DOM

find element is exists in DOM or not.

$.fn.isInDOM = function(){
    return this.parents(document).length > 0;
};
jquery check if element is in DOM jquery check if element is in DOM Reviewed by Bhaumik Patel on 1:53 AM Rating: 5