Skip to content

Instantly share code, notes, and snippets.

@mikote2000
Created October 6, 2017 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikote2000/c6d3946b13ca306816281e23e8c8e2ae to your computer and use it in GitHub Desktop.
Save mikote2000/c6d3946b13ca306816281e23e8c8e2ae to your computer and use it in GitHub Desktop.
Filas de una tabla clickables
//Ponemos el not #column_edit por si tenemos un td en el que tengamos botones para borrar, copiar, etc.
$(document).ready(function () {
$(".clickable-row td").not('#column_edit').click(function() {
window.document.location = $(this).parent('tr').data("href");
});
});
<table>
<tr class="clickable-row" id="registro-1" data-href="proyectos/proyecto/1">
<td>Proyecto 1</td>
<td>Productivo</td>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment