$("#foo > div").length
Direct children of the element with the id ‘foo’ which are divs. Then retrieving the size of the wrapped set produced.
More Related Contents:
- Get selected text from a drop-down list (select box) using jQuery
- How can I select an element by name with jQuery?
- jQuery DOM changes not appearing in view source
- jQuery difference between :eq() and :nth-child()
- .prop() vs .attr()
- How to get the children of the $(this) selector?
- Check if an image is loaded (no errors) with jQuery
- How do I get jQuery to select elements with a . (period) in their ID?
- Difference between “change” and “input” event for an `input` element
- Why are duplicate ID values not allowed in HTML?
- What is difference between width, innerWidth and outerWidth, height, innerHeight and outerHeight in jQuery
- Testing if a checkbox is checked with jQuery
- Is there a DOM event that fires when an HTML select element is closed?
- How do you check if a selector matches something in jQuery? [duplicate]
- How to detect when an iframe has already been loaded
- jQuery: how to change tag name?
- jQuery select and wrap textNode
- How can I remove all CSS classes using jQuery/JavaScript?
- jQuery find and replace string
- Converting a recursive function into an asynchronous CPS implementation (javascript)
- jQuery support “:invalid” selector
- Convert String to XML Document in JavaScript
- How to set DOM element as first child?
- JQuery – animate moving DOM element to new parent?
- Open new window without focus on it [duplicate]
- Combine two selectors with one jQuery object
- window.getSelection return html [duplicate]
- How to select empty inputs (value=””) using jQuery
- What’s the difference between a jQuery object and a DOM element? Difference between .get() and .index()?
- Create a table in SVG