jquery filter using class not working -
i adding disabled property input element having class
.vehicleisininvoice
like
$(".vehicleisininvoice :input").prop("disabled", true);
it works correct. have exclude input element under class
.excludefromdisabled
for using jquery filter
$(".vehicleisininvoice :input").filter('.excludefromdisabled').prop("disabled", true);
but didn't work me. in short class strchture
.vehicleisininvoice -> .excludefromdisabled -> input elements
html of page
<div class="vehicleisininvoice"> <div class="details"> <input type="text"> </div> <div class="excludefromdisabled"> <input type="text"> <input type="text"> </div> </div>
the filter()
method filter input element not parent, instead update selector.
$(".vehicleisininvoice.excludefromdisabled :input").prop("disabled", true);
or
filter()
method $('.vehicleisininvoice').filter('.excludefromdisabled').find(':input').prop("disabled", true);
Comments
Post a Comment