javascript - Using jQuery to check if a class exist -
is there way see if layer has sub layer specific class.
so in html have;
html
<div class='tab'> <div class='not-loaded'></div> </div>
js/jq
$('.tab').contains('not-loaded'); //to return boolean or $('.tab').classexist('not-loaded'); //to return boolean
basicly want check if tabs have loaded dynamic html content.
test length using find
if($('.tab').find('.not-loaded').length)
or usinghas
if($('.tab:has(".not-loaded")').length)
Comments
Post a Comment