jquery newbie question -
i need creating jquery function checkboxes when these disabled, pretty want if input has attribute disable apply css label next it, if not nothing. in advance help.
the html looks this:
<div class="add-filters"> <table> <tr> <td> <input type="checkbox" id="filter" name="filter" disabled="disabled" /> <label for="filter">filter</label> </td> </tr> </table> </div>
$('input[type="checkbox"]').each(function() { if($(this).attr('disabled')) { $(this).siblings('label').addclass('newclassname'); } });
Comments
Post a Comment