Demuri Celidze Demuri Celidze - 11 months ago 91
CSS Question

How to replace pseudo class :placeholder-shown with jquery

I have a form where

changes on
( Works fine, but in only few browsers. How to add and remove some class with jQuery to replace this not-cross-browser

Answer Source
You can use jQuery:

$("#my_input").on("keydown keypress keyup paste", function () {

    var textColor = $(this).val() ? "red" : "green";

    $("div label").css({"color" : textColor});