Skip to content

Instantly share code, notes, and snippets.

View PikachuEXE's full-sized avatar
Pika~Pika~

PikachuEXE PikachuEXE

Pika~Pika~
View GitHub Profile
@PikachuEXE
PikachuEXE / placeholder.js
Created April 26, 2013 04:55
jQuery HTML5 placeholder fix Written in CoffeeScript and converted into JavaScript later This is supposed to deal with dynamically loaded elements Not tested though
/**
* This hack creates the placeholder effect on old browsers
*
* Source: http://www.hagenburger.net/BLOG/HTML5-Input-Placeholder-Fix-With-jQuery.html
* Dependency: jQuery & Modernizr
*
* It also add a class to the input so you can style it to look like normal placeholder
*/
jQuery(function($) {