silly - placeholder js

This commit is contained in:
sanj 2010-08-30 00:15:12 +05:30
parent eab5b07dc4
commit 39603f3211

View File

@ -7,7 +7,7 @@ $(document).ready(function() {
$('input, textarea').each(function() {
var hasPlaceholder = $(this).attr("data-placeholder") == undefined ? false : true;
if (hasPlaceholder) {
$(this).data("placeholder") = $(this).attr("data-placeholder");
$(this).data("placeholder", $(this).attr("data-placeholder"));
$(this).addClass("placeholder").val($(this).data("placeholder"));
$(this).focus(function() {
var currText = $(this).val();