Jquery toggle input disabled attribute
Posted
by
Tommy Arnold
on Stack Overflow
See other posts from Stack Overflow
or by Tommy Arnold
Published on 2011-01-15T20:37:21Z
Indexed on
2011/01/15
20:53 UTC
Read the original article
Hit count: 201
here is my 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
});
how do i toggle .attr('disabled',false);
I cant seem to find it on google.
© Stack Overflow or respective owner