Find an element by class name, from a known parent element
Posted
by user246114
on Stack Overflow
See other posts from Stack Overflow
or by user246114
Published on 2010-06-14T02:22:12Z
Indexed on
2010/06/14
2:32 UTC
Read the original article
Hit count: 175
jQuery
Hi,
I want to find an element by class name. I know it will appear in a particular parent div, so rather than search the entire dom, I'd like to search only the particular div. I am trying this, but does not seem to be the correct syntax:
var element = $("#parentDiv").(".myClassNameOfInterest");
what's the right way to do that?
Thanks
© Stack Overflow or respective owner