silly - placeholder js
This commit is contained in:
parent
eab5b07dc4
commit
39603f3211
|
@ -7,7 +7,7 @@ $(document).ready(function() {
|
||||||
$('input, textarea').each(function() {
|
$('input, textarea').each(function() {
|
||||||
var hasPlaceholder = $(this).attr("data-placeholder") == undefined ? false : true;
|
var hasPlaceholder = $(this).attr("data-placeholder") == undefined ? false : true;
|
||||||
if (hasPlaceholder) {
|
if (hasPlaceholder) {
|
||||||
$(this).data("placeholder") = $(this).attr("data-placeholder");
|
$(this).data("placeholder", $(this).attr("data-placeholder"));
|
||||||
$(this).addClass("placeholder").val($(this).data("placeholder"));
|
$(this).addClass("placeholder").val($(this).data("placeholder"));
|
||||||
$(this).focus(function() {
|
$(this).focus(function() {
|
||||||
var currText = $(this).val();
|
var currText = $(this).val();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user