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

0

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');
}
Posted by: Guest on October-21-2021
0

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

var $collection = $(".parent2").find(".child3").length;
if ($collection.length)....
Posted by: Guest on October-21-2021

Code answers related to "jquery: return true or false if the element is present in the DOM or not"

Code answers related to "Javascript"

Browse Popular Code Answers by Language