Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery: return true or false if the element is present in the DOM or not

var elm = $('.parent1');
if(elm.has('.child3')){
   var child3 = elm.find('.child3');
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #true #false #element #present #DOM
ADD COMMENT
Topic
Name
5+7 =