Check whether an Element Exists using JQuery

In JavaScript to check whether an element exist or not we can use something like this if(document.getElementById( ‘Elementid’ )) But in case of jQuery to check an element exist or not the code can be written like this if ( $( ‘#elementId’ ).length >0 ) We can also leave the >0 and the code will … Read more