Demuri Celidze Demuri Celidze - 1 year ago 158
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});

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download