Check HTML Element exists

To check html element exist in page use following code.

   if(!!$(element).offset()){
       alert("Element Exists");
   }else{
      alert("Element Not Exists in DOM");
   }