Use a selector that will select all the rows and take the length.
var rowCount = $('#myTable tr').length;
Note: this approach also counts all trs of every nested table!
More Related Contents:
- How to show loading spinner in jQuery?
- TypeError: ‘undefined’ is not a function (evaluating ‘$(document)’)
- Jquery live() vs delegate() [duplicate]
- Use jQuery to change a second select list based on the first select list option
- jQuery Call to WebService returns “No Transport” error
- Custom date format with jQuery validation plugin
- jQuery event handlers always execute in order they were bound – any way around this? [duplicate]
- jQuery – Detect value change on hidden input field
- detect elements overflow using jquery
- Get clicked element using jQuery on event?
- Cannot modify content of iframe, what is wrong?
- How to show/hide an element on checkbox checked/unchecked states using jQuery?
- jQuery: Check if image exists
- How can I get the corresponding table header (th) from a table cell (td)?
- jQuery override default validation error message display (Css) Popup/Tooltip like
- jQuery if div contains this text, replace that part of the text
- How do I select elements on multiple attribute values
- jQuery attribute selector for multiple values
- How can I disable a button on a jQuery UI dialog?
- Detect page change on DataTable
- Using jquery to make a POST, how to properly supply ‘data’ parameter?
- Twitter Bootstrap add active class to li
- Ajax post serialize() does not include button name and value
- Animate an element’s width from 0 to 100%, with it and it’s wrapper being only as wide as they need to be, without a pre-set width, in CSS3 or jQuery
- Detect change to selected date with bootstrap-datepicker
- Use jQuery to convert JSON array to HTML bulleted list
- How to get form html() via jQuery including updated value attributes?
- jQuery Removing specific text from an element
- scroll up and down a div on button click using jquery
- Highlight text inside html with jQuery