Javascript: Difference between revisions

Jump to navigation Jump to search
570 bytes added ,  16 February 2013
No edit summary
Line 23: Line 23:
** <nowiki>$("#selector_id").css("display", "");</nowiki> or <nowiki>$("#selector_id").css("display", "block");</nowiki>
** <nowiki>$("#selector_id").css("display", "");</nowiki> or <nowiki>$("#selector_id").css("display", "block");</nowiki>
** <nowiki>$("#selector_id").css("display", "none");</nowiki>
** <nowiki>$("#selector_id").css("display", "none");</nowiki>
== count the number of visible table rows ==
* <nowiki>$('#selector_id:visible').length;</nowiki>  jQuery v.1.9.1<ref>[http://stackoverflow.com/questions/2931893/jquery-selector-to-count-the-number-of-visible-table-rows jquery selector to count the number of visible table rows? - Stack Overflow]</ref>
* <nowiki>$('#selector_id:not([style*="display: none"])').length;</nowiki> {{exclaim}} jQuery v.1.9.1 + {{IE}} v.8 not work
count the number of all table rows (includes visible and invisible rows)
* <nowiki>document.getElementById( table_id ).rows.length;</nowiki>


== references ==
== references ==

Navigation menu