Mouse click on TR of the table does not trigger the last td

0

Below I have a row in a table. This line can be marked by clicking anywhere on it with the mouse by triggering a click event.

But specifically in the button, I do not want the javascript event to fire. Because the way it is never trigger the button submit, it just calls the javascript event. It's possible?

<tr role="row" class="bg-green disabled color-palette">
    <form method="POST" action="index.php"></form>
        <td class="sorting_1">26-OCT-17</td>
        <td>02:00</td>
        <td>Quinta-feira</td>
        <td>Sala 02 Bloco Cirurgico</td>
        <td class="text-center botao-td">
            <button type="submit" class="btn bg-navy btn-flat loading" id="botao-formulario"><i class="fa fa-check-square-o"></i> </button>
        </td>
    </form>
</tr>

- Javascript:

 $("#grade-horario tr").click(function(){
     Ações.....
 }
    
asked by anonymous 26.10.2017 / 15:10

1 answer

0

Change your js code, use the selectors: not and nth-child , do the following:

$("#grade-horario tr td:not(:nth-child(5))").click(function(){
    //ações
}
    
26.10.2017 / 15:32