Skip to content

Instantly share code, notes, and snippets.

View MikeRogers0's full-sized avatar
๐Ÿš‚

Mike Rogers MikeRogers0

๐Ÿš‚
View GitHub Profile
@MikeRogers0
MikeRogers0 / allow-from-ip
Created June 10, 2012 21:57
Blocking users via .htaccess
order allow,deny
allow from [IP here]
deny from all
@MikeRogers0
MikeRogers0 / gist:1751763
Created February 6, 2012 12:02 — forked from westonruter/gist:311373
jQuery fallback implementation of HTML5 placeholder attribute
if(!jQuery('<input PLACEHOLDER="1" />')[0].placeholder){ //Uppercase attr for IE
jQuery(':input[placeholder]').each(function(){
var $this = $(this);
if(!$this.val()){
$this.val($this.attr('placeholder'));
$this.addClass('input-placeholder');
}
}).live('focus', function(e){
var $this = $(this);
if($this.hasClass('input-placeholder')){