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