Created
April 9, 2016 14:10
-
-
Save ruancarvalho/5eb669e82bf071e8b69b175acd79ecd9 to your computer and use it in GitHub Desktop.
Função AddTableRow com 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
(function($) { | |
AddTableRow = function() { | |
var newRow = $("<tr>"); | |
var cols = ""; | |
cols += '<td> </td>'; | |
cols += '<td> </td>'; | |
cols += '<td> </td>'; | |
cols += '<td> </td>'; | |
cols += '<td>'; | |
cols += '<button onclick="RemoveTableRow(this)" type="button">Remover</button>'; | |
cols += '</td>'; | |
newRow.append(cols); | |
$("#products-table").append(newRow); | |
return false; | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment