var disabled = $('input[type="radio"]:disabled'); disabled.each(function () { var self = $(this), field = self, overlay = $('<div />'); if (self.parent().is('label')) { field = self.parent(); } overlay.css({ position: 'absolute', top: field.position().top, left: field.position().left, width: field.outerWidth(), height: field.outerHeight(), zIndex: 10000, backgroundColor: '#ffffff', opacity: 0 }).click(function () { alert('You must log in.'); }); self.parent().append(overlay); });
<label><input type="radio" name="radio" value="1" disabled>1</label> <label><input type="radio" name="radio" value="2">2</label> <input type="radio" name="radio" value="3" disabled>3</label> <input type="radio" name="radio" value="4">4 </label>