Skip to content

Commit

Permalink
Use latest placeholder shim from http://github.com/parndt/jquery-html…
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jul 19, 2010
1 parent b31627f commit e5d75f1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions public/javascripts/jquery/jquery.html5-placeholder-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
var config = {
color: '#888',
cls: '',
lr_padding:4
lr_padding:4,
selector: 'input[placeholder], textarea[placeholder]'
};
$.extend(config,opts);
!this.browser_supported() && $('input[placeholder]')._placeholder_shim(config);
!this.browser_supported() && $(config.selector)._placeholder_shim(config);
}
}});

Expand Down Expand Up @@ -48,8 +49,7 @@
textAlign: 'left',
color: config.color,
cursor: 'text',
fontSize: $(this).css('font-size'),
lineHeight: $(this).css('height')
fontSize: $(this).css('font-size')
})
.css(calcPositionCss(this))
.attr('for', this.id)
Expand Down Expand Up @@ -77,5 +77,7 @@
})(jQuery);

$(document).ready(function() {
$.placeholder.shim();
if ($.placeholder) {
$.placeholder.shim();
}
});

0 comments on commit e5d75f1

Please sign in to comment.