Voici mon code :
$("#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.
});
Comment basculer .attr('disabled',false);
?
Je n'arrive pas à le trouver sur Google.
0 votes
Y a-t-il une raison pour laquelle vous ne pouvez pas utiliser la propriété "disabled" du champ ?
$("input").get(0).disabled = isFalse;
// jsfiddle.net/uAfhj0 votes
J'ai trouvé le Dépend de plugin qui pourrait vous être utile