If input has a value, hide label
Hi,
I'm trying to achieve that if an input-box has a value it's label should hide.
Please have a look at my example on CodePen:
The part which is not working is this:
- if ($(this).val() !='') {
- $(this).closest('.form-label').hide();
- }
What is wrong with my code?
Thanks