javascript - How to check an id in a webpage is there or not using jquery -
can tell me how know if id tag in webpage present or not. suggest using jquery.
use length
property of jquery object. amount of elements found selector. there no need use > 0
too, because 0
interpreted false
.
if( $("#myid").length ) { // available }
Comments
Post a Comment