jQuery.fn.exists = function(){return this.length>0;}
Example :
if($(".spl_req").exists()){ console.log("Element Exist");}else{
console.log("Element Not Exist");
}
No comments:
Post a Comment