I am trying to apply these css in jquery when the input field have some value,
I tried these jquery codes, but it's not working.
Please suggest me!
if ($('#user-email').val() != ''){
$(".email-capt").css({"position":"absolute","margin-top":"0px"});
}
<div class="input-container input-email">
<button class="btn btn-default email-btn"><span class="glyphicon glyphicon-chevron-right"></span></button>
<input type="email" required="" value="" tabindex="1" name="name" class="" id="user-email">
<label for="arrival" class="email-capt">Enter your email to be in the know</label>
</div>