How to create shadow in JSF input field and keep it when the user clicks on it
<p>I have this JavaScript which is used for creating shadow into input field:</p>

<pre><code>&lt;!-- input field shadow  --&gt;
    var placeholder = "#{GlassfishController.date}"
    $("input").on({
        focus: function() {
            if (this.value == placeholder) {
                $(this).val("").removeClass("shadow");
            }
        },
        blur: function() {
            if (this.value == "") {
                $(this).val(placeholder).addClass("shadow");
            }
        }
    }).trigger("blur");       
</code></pre>

<p>Now the script displays the time format. But when I click with the mouse in the field the text disappears. I want to modify the script to disappear only when I type key. How I can do this?</p>

<p>Best Wishes  </p>
