JSFiddle - React, Tailwind, and code Playground

by GaryC123

HTML

<select>
    <option>JKJKLJKL</option>
</select>

JavaScript

jQuery(function () {
    jQuery.support.placeholder = false;
    test = document.createElement('input');
    if ('placeholder' in test) jQuery.support.placeholder = true;
});

$(function () {
    if ($.support.placeholder) {

        var active = document.activeElement;

        var pass = $('#password').attr("type","text")

        $(':text').focus(function () {
            if($("[name=password]",this)){
                $(this).attr("type","password")
            }
        })
            if ($(this).attr('placeholder') != '' && $(this).val() == $(this).attr('placeholder')) {
                $(this).val('').removeClass('hasPlaceholder');
            }
        }).blur(function () {
            if ($(this).attr('placeholder') != '' && ($(this).val() == '' || $(this).val() == $(this).attr('placeholder'))) {
                $(this).val($(this).attr('placeholder')).addClass('hasPlaceholder');
            }
        });

   }
});