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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -