JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" class="fade" name="tabTesting" value="">
<input class='urlCheck' type="text" class="fade" name="website" value="Current website">
JavaScript
/*function clearMeHttp(formfield) {
if (formfield.defaultValue == formfield.value) {
formfield.value = "http://";
}
};*/
var defaultVal = 'Current website';
$(function() {
$('.urlCheck').focus(function(e) {
if ($(this).val() == "http://" || $(this).val() == '' || $(this).val() == defaultVal) {
$(this).val('http://');
$(this).select(false);
}
});
$('.urlCheck').keyup(function(e) {
if ($(this).val() == "http://" || $(this).val() == '' || $(this).val() == defaultVal) {
$(this).val('http://');
}
});
$('.urlCheck').blur(function(e) {
$(this).val(defaultVal);
});
});