$( document ).ready(function() { $('.addoncheckbox').each(function() { if($(this).is(':disabled')) { $(this).parent().addClass('input-disabled'); } }); $('.addoncheckbox').click(function() { $(this).parent().toggleClass('input-checked', this.checked); $(this).next().find('i').toggleClass('fa-plus fa-check'); }); });