Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update the compiled file

  • Loading branch information...
commit 2974f644db7458d20368d162a59b71961e425bbc 1 parent abf1ef1
Godisemo authored February 20, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  min/jquery.auto-placeholders.js
2  min/jquery.auto-placeholders.js
@@ -3,4 +3,4 @@ jQuery Auto Placeholders
3 3
 (c) 2012 Filip Stefansson, @filipstefansson
4 4
 Adds support for the placeholder attribute in older browsers.
5 5
 */
6  
-var $;$=jQuery;$.fn.autoPlaceholders=function(){var a,b;b=!1;if(typeof Modernizr!="undefined"&&Modernizr!==null)b=Modernizr.input.placeholder?!0:!1;else{a=document.createElement("input");"placeholder"in a&&(b=!0)}if(!b)return $("input, textarea",this).each(function(){var a;if($(this).attr("placeholder")!=null){a=$(this).attr("placeholder");$(this).val(a).addClass("placeholder");$(this).bind("focus",function(){if($(this).val()===a)return $(this).val("").removeClass("placeholder")});return $(this).bind("blur",function(){if($(this).val()==="")return $(this).val(a).addClass("placeholder")})}})};
  6
+var $;$=jQuery;$.fn.autoPlaceholders=function(){var a,b;b=false;if(typeof Modernizr!=="undefined"&&Modernizr!==null){b=Modernizr.input.placeholder?true:false}else{a=document.createElement("input");if("placeholder"in a){b=true}}if(!b){$("input, textarea",this).each(function(){var a;if($(this).attr("placeholder")!=null){a=$(this).attr("placeholder");$(this).val(a).addClass("placeholder");$(this).bind("focus",function(){if($(this).hasClass("placeholder")){return $(this).val("").removeClass("placeholder")}});return $(this).bind("blur",function(){if($(this).val()===""){return $(this).val(a).addClass("placeholder")}})}});return $("form").submit(function(){return $(this).find(":input.placeholder").each(function(){return $(this).val("")})})}}

0 notes on commit 2974f64

Please sign in to comment.
Something went wrong with that request. Please try again.