Miva Merchant Modules and Development
Want to start an online store? We work with you from start to finish, from commerce platform to design to SEO.
Experience counts, and we have a lot.

JQUERY: Click in a TD to check a checkbox in the td

Scot Ranney • December 19, 2023


Jquery: Click in a TD of a table to check the checkbox in that td. 

<script>
$('td').click(function (event) {
	if (!$(event.target).is('input')) {
	   $('input:checkbox', this).prop('checked', function (i, value) {
		return !value;
	   });
	}
});	
</script>

https://www.scotsscripts.com/mvblog/jquery-click-in-a-td-to-check-a-checkbox-in-the-td.html

mvkb_jquery mvkb_table