button into a column on a HTML Table problem
hi
i am working on create a HTML table with some columns, in 1 column i have a button(1 button for each row) with the class="verDetalle"
in this thread:
i have solved part of my problem (detect the click event).
- $(document).on('click', '.verDetalle', function () {
- console.log($(this).text());
- alert(this.rowIndex);
- var widsala = $("#xcombsalas option:selected").val();
- var $wRenglon = $(this).closest("tr");
- var $myId = $wRenglon.find("td:nth-child(1)");
- debugger;
- var whtml = '';
the console.log display "Ver Detalle" (line 2)
the alert not display the rowIndex, display a "undefined" message (line 3).
in the line 5 i want know which button was pressed(the row), and in line 6 i start get the values of each cell.
not work thes code, how to fix?
Thanks