I don't want to go to another page. If i clicked the button modal. I will stay only to the page because the button modal is associated with the form in modal dialog.
But if i click to the tr itself. it will also allow me to redirect to another page.
<tr onclick="window.location='url';" style="cursor: pointer;">
<td>
<p class="mb-1"><h5>Title</h5></p>
</td>
<td>
<button type="button" class="btn btn-primary btn-sm apply" data-target="#div_jobApplicant" data-toggle="modal" data-modal-type="form" data-id="1">APPLY THIS JOB</button>
</td>
</tr>
Thank you for any help.
ALREADY RESOLVED-------
Reference:
jQuery <tr> link except button which opens Bootstrap Modal
$('tr[data-href]').on("click", function() {
if(!$(event.target).is(":button")) {
document.location = $(this).data('href');
}
});
i just import this code. Thanks