bail early if we have built-in placeholder support
This commit is contained in:
Родитель
2d882b7bad
Коммит
6ced985d0d
|
@ -47,6 +47,10 @@ var format = function(s, args) {
|
|||
|
||||
/* Fake the placeholder attribute since Firefox doesn't support it. */
|
||||
jQuery.fn.placeholder = function() {
|
||||
/* Bail early if we have built-in placeholder support. */
|
||||
if ('placeholder' in document.createElement('input')) {
|
||||
return this;
|
||||
}
|
||||
return this.focus(function() {
|
||||
var $this = $(this),
|
||||
text = $this.attr('placeholder');
|
||||
|
|
Загрузка…
Ссылка в новой задаче