How to add a pseudo-element in jquery

$('.email').blur(function() {
if (!validateEmail($(this).val()) ) {
$(this).removeClass("blur").addClass("focus");
} else {
$(this).removeClass("focus").addClass("blur");
}
})

<input type="email" size="61" class="email"></input>

.focus{border: 1px solid red;outline: none;}
.blur{border: 1px solid #7dc855;outline: none; }

.focus:after{
content: "\00D7";
position: relative;
top: -24px;
left: 500px;
color: red;
}

.blur + label:before{
content: "\2713";
position: relative;
top: -24px;
left:...

How to add a pseudo-element in jquery

from JavaScript http://ift.tt/24mTKAB
via IFTTT
Previous
Next Post »
Thanks for your comment