KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to detect if any of the sub-divs within the parent "gallery" div have a class of "show". <div id="gallery"> <div class="show"></div> <div></div> <div></div> </div> if (TEST CONDITION) { alert('sub element with the class show found'); } else { alert('not found'); } It doesn't have to be in a if/else format. To be able to do this in a jQuery chainning sort of way would be better.
Tags (comma-separated)
Save Edits
Cancel