I was examining another stack overflow page and discovered that it almost solved my issue of how to temporarily change the placeholder text of my search (input) box, but it doesn't revert the changes to the original text after a specified time. I want it so that after the highlighting has finished its 3 second (3000) appearance/fade, the placeholder text also reverts to the original.
Original placeholder was Search By Number
Code is as follows:
$(document).ready(function(){
if ($("input").val() == "") {
$("button").click(function(event) {
$("input").attr("placeholder","Enter Account Number.");
$("input").effect("highlight",{color:"#D46A6A"},3000);
event.preventDefault();
});
}
});
I tried putting 3000 after "Enter Account Number", so that it looked like $("input").attr("placeholder","Enter Account Number.",3000);, but that did not work.
Thanks!