Created
August 1, 2017 20:57
-
-
Save rodrigobravo/afa803c7c6d21ddd4b37ae347ce63e6b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| $(document).ready(function(){ | |
| var $tabela_novospedidos = $('#tabela_novospedidos'); | |
| $tabela_novospedidos.empty(); //Limpando a tabela | |
| $.get("database2.php", function(data, status){ | |
| var dados_pedido = data; | |
| const obj = dados_pedido; | |
| dados = $.parseJSON(data); | |
| $.each(dados, function(i, item) { | |
| acumulador = item.acumulador; | |
| console.log(acumulador); | |
| (function adiciona($) { | |
| var newRow = $("<tr>"); | |
| var cols = ""; | |
| cols += '<td>'+acumulador+'</td>'; | |
| cols += '<td> </td>'; | |
| cols += '<td> </td>'; | |
| cols += '<td> </td>'; | |
| cols += '<td> </td>'; | |
| cols += '<td> </td>'; | |
| cols += '<td> </td>'; | |
| newRow.append(cols); | |
| $("#tabela_novospedidos").append(newRow); | |
| return false; | |
| }) | |
| }); | |
| }); | |
| } | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment