TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ankush
NA
267
63.2k
Count number of divs with same class name in a specific div in jquery
Oct 27 2020 2:02 AM
I have following divs
<
div
class
=
"Main"
>
<
div
class
=
"pipe"
>
<
div
class
=
"mine"
>
</
div
>
<
div
class
=
"mine"
>
</
div
>
<
div
class
=
"mine"
>
</
div
>
</
div
>
<
div
class
=
"pipe"
>
<
div
class
=
"mine"
>
</
div
>
<
div
class
=
"mine"
>
</
div
>
</
div
>
</
div
>
var count = $(.pipe.mine).length;
It counts all divs with class = "mine" and shows count as 5.
but I want to only count divs with class = "mine" in upper div not both the divs
Thanks in Advance!!!
Reply
Answers (
7
)
fetch a value using fieldref and pass to var in Ext js
I need the JQuery function for filtration.