JSFiddle - React, Tailwind, and code Playground

by Afzaal Ahmad Zeeshan

HTML

<input type="text" placeholder="Text!">

JavaScript

var placeholderValue = "";
    $('input').focus(function () {
      placeholderValue = $(this).attr('placeholder'); // save the value
      $(this).attr('placeholder', ''); // remove the value for that
    });
    $('input').blur(function () {
      $(this).attr('placeholder', placeholderValue); // update the value! :)
    })