﻿$(document).ready(function () { if (!Modernizr.input.placeholder) { $("[placeholder]").focus(function () { if ($(this).val() == $(this).attr("placeholder")) { $(this).val(""); $(this).removeClass("placeholder") } }).blur(function () { if ($(this).val() == "" || $(this).val() == $(this).attr("placeholder")) { $(this).val($(this).attr("placeholder")); $(this).addClass("placeholder") } }); $("[placeholder]").parents("form").submit(function () { $(this).find("[placeholder]").each(function () { if ($(this).val() == $(this).attr("placeholder")) { $(this).val("") } }) }); $(this).find("[placeholder]").each(function () { $(this).val($(this).attr("placeholder")); $(this).addClass("placeholder") }) } })
