Created
May 16, 2012 15:51
-
-
Save esauro/2711509 to your computer and use it in GitHub Desktop.
jQuery selector for table rows o table cols based on http://programanddesign.com/js/jquery-select-table-column-or-row/, modified to make row includes th
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$.fn.row = function(i) { | |
return $('tr:nth-child('+(i+1)+') td, tr:nth-child('+(i+1)+') th', this); | |
} | |
$.fn.column = function(i) { | |
return $('tr td:nth-child('+(i+1)+')', this); | |
} | |
$('table').row(2).hide(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment