constraint btn-edit event inside table not in $(document)

This commit is contained in:
amazuecos
2025-04-12 08:00:32 +02:00
parent e7394999ab
commit 38d60402c0
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ class ClientePedidos {
$(this).tab('show');
});
$(document).on('click', '.btn-edit', function (e) {
$('#tableOfPedidosCliente').on('click', '.btn-edit', function (e) {
window.location.href = '/pedidos/edit/' + $(this).attr('data-id');
});

View File

@ -17,8 +17,8 @@ class ClientePresupuestos {
$(this).tab('show');
});
$(document).on('click', '.btn-edit', function (e) {
window.location.href = $('#clienteForm').attr('data-url'); + $(this).attr('data-id');
$('#tableOfPresupuestosCliente').on('click', '.btn-edit', function (e) {
window.location.href = $('#clienteForm').attr('data-url') + $(this).attr('data-id');
});
const lastColNr = $('#tableOfPresupuestosCliente').find("tr:first th").length - 1;