On that web page I have input fields that use the Mike Taylor html5 placeholder. I assign values to the input fields in javascript like this.
document.add_event_form.end_time.value = time_array[0];
The placeholder after that is still visible under the value given to that field. Is there a way to make the placeholder aware that a value was specified?
You have to manually hide the
<label>element which that placeholder plugin generates.Alternatively, you could trigger the
focus()andblur()events for that input because those are the same events that the placeholder plugin uses.NOTE: Since the plugin you’re using replies on jQuery, so does my answer.