/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//If div isn't empty, display div2. $('#div').keyup(function () { if ($(this).val()) { $("#div2:hidden").show(); $('#div2').addClass('inputclass pageRequired'); } else { $('label[for=test]').hide(); $('#div2:visible').removeClass('inputclass pageRequired'); $("#div2:visible").hide() } });
Comments
