Yeak Yeak - 6 months ago 51
HTML Question

jquery find all hidden input fields with specific class name

I have a couple of table rows and tables with hidden input fields and values. What i need to do is loop through all the hidden input fields and find a specific field where the class = 'something' and value = something and go up to the

of that input field and change the background color.

if( $(this).find(".id_schedule_hours") && $(this).val() == 1) {


.each() is not necessary; you can use attributes selector, .closest()

.closest("td").css("backgroundColor", /* color */)