Created
May 9, 2018 06:58
-
-
Save TakuyaHarayama/c089ad7b8f0bd19f750982c9b9acbdd4 to your computer and use it in GitHub Desktop.
ヘッダー付きtableのカラムを増やすjQuery
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
// ヘッダー付きtableのカラムを増やすjQuery | |
$('table').find('tr').each(function(){ | |
if ($('table').index(this)) { | |
$(this).find('th:last-child').after('<th>new column added</th>'); | |
} | |
$(this).find('td:last-child').after('<td>new cell added</td>'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment