سؤال

I have some a table in which i have rows with same id and other rows with other same id. Every row has a checkbox and i want to change the backgroundcolor of all the unchecked checkbox inside all rows with one id. this is what i try to do:

function resetOtherCheckBox(){
   $('#sent').find('input:checkbox:not(:checked)').css('background-color', '#33CCCC');
}

what is the error? help me pls

هل كانت مفيدة؟

المحلول

I solve in this way:

$("tr.sent input[type=checkbox]:not(:checked)").parents('tr').css('background-color', '#33CCCC');

نصائح أخرى

$('#sent').find('input[type=checkbox]').not(':checked')

Have a look at this fiddle: http://jsfiddle.net/3KWSr/1/

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top