Oto mój kod:Przełącz wejście nieaktywne atrybut przy użyciu jQuery
$("#product1 :checkbox").click(function(){
$(this)
.closest('tr') // Find the parent row.
.find(":input[type='text']") // Find text elements in that row.
.attr('disabled',false).toggleClass('disabled') // Enable them.
.end() // Go back to the row.
.siblings() // Get its siblings
.find(":input[type='text']") // Find text elements in those rows.
.attr('disabled',true).removeClass('disabled'); // Disable them.
});
Jak mogę przełączyć .attr('disabled',false);
?
Nie mogę znaleźć tego w Google.
Każdy powód, dlaczego nie można użyć właściwości wyłączoną pola? '$ (" input "). get (0) .disabled = isFalse;' // http://jsfiddle.net/uAfhj/ – Shanimal
Znalazłem [DependsOn] (https://github.com/dstreet/dependsOn) wtyczka, która może ci się przydać – Ben