Bit of an odd thing happening here, I have a table of data with rows that can be selected by clicking on any cell in the row, the last cell has some other functions attached to it, so it can select the row (check the checkbox) but not unselect it:
Here is the markup:
<tr class="82510246 inventory-row">
<td>
<input type="checkbox" value="82510246" name="tags[]" id="tag82510246" class="checkbox inventory-checkbox">
</td>
<td>40003</td>
... a whole bunch of cells ...
<td>430</td>
<td class="inventory-price">
<a class="tag-price">0.7289</a>
</td>
</tr>
AND THE JQUERY:
$('.inventory-row').on('click', 'td', function(event) {
var css = $(this).attr('class');
var box = $(this).closest('tr').find(':checkbox').is(':checked');
if(css !== 'inventory-price'){
$(this).closest('tr').find(':checkbox').trigger('click');
}
if(css == 'inventory-price' && !box){
$(this).closest('tr').find(':checkbox').trigger('click');
}
});
I can't click on the cell/checkbox directly - if I click on that cell, nothing happens (box does not select/deselect)
Why is that not happening?
:notclause in your.onselector?