How can I change my rowspan tr elements background when check box checked? tr elements have rowspan attribute.
My JS Code is..
$(document).ready(function(){
$('.test-table-list input[type="checkbox"]').click(function(){
if($(this).is(':checked')){
$(this).parents('tr').css('background', 'yellow');
}else{
$(this).parents('tr').css('background', '#fff');
}
});
});
when i used this code then tr change like this image
I don't think the html code is necessary, so I won't attach it.
I want the background color of all related tr(colspan) elements related to checked tr to change.
===== EDIT ====
i attached my full code at CODEPEN
https://codepen.io/hongkt/pen/NWvxoOE
Does anyone know the answer? i want all realated tr elements background color change.
