Click function enabled, but only on four of five columns.
Click function enabled, but only on four of five columns.
Hi,
I've made a table that lists different projects, where the first column shows the ID of that Project.
I've added a click function that sends the ID value in the first column to a server side script with this code;
[code]
$('tr.odd,tr.even').live('click', function() {
window.location = 'neworders/order-assets.php?id='+$(this).contents()[0].innerHTML;
});
[/code]
I just have one problem... tr.odd and tr.even makes the whole line clickable, which prevents me from another function i need, and that is checkboxes on column 5. I want the 4 first columns to be clickable, so that this send the ID to the server side script, but not on the fifth.
Does anybody have a solution for this?
I've made a table that lists different projects, where the first column shows the ID of that Project.
I've added a click function that sends the ID value in the first column to a server side script with this code;
[code]
$('tr.odd,tr.even').live('click', function() {
window.location = 'neworders/order-assets.php?id='+$(this).contents()[0].innerHTML;
});
[/code]
I just have one problem... tr.odd and tr.even makes the whole line clickable, which prevents me from another function i need, and that is checkboxes on column 5. I want the 4 first columns to be clickable, so that this send the ID to the server side script, but not on the fifth.
Does anybody have a solution for this?
This discussion has been closed.