I am trying to implement a blinking effect on the placeholder text when the input field loses focus.
Here is the HTML code I have written:
<input type="text" id="keyfob" class="customform col-sm-12 text-red" data-required='true' placeholder="Please click here to Key Fob scanning work">
This is the jQuery code I have used:
$('#keyfob').on("focus blur", function(){
$(this).attr("placeholder") == "" ? $(this).attr("placeholder", "Please click here for Key Fob scanning to work") : $(this).attr("placeholder", "");
});
You can check out the working JSFiddle code here.
Currently, I am looking for help to add a blinking effect to the placeholder text "Please click here to Key Fob scanning work". Can anyone assist me with this task?