Skip to content

Commit

Permalink
Fix a typo that caused chaining to break in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Mar 8, 2012
1 parent 5a01d98 commit c548851
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions jquery.placeholder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! http://mths.be/placeholder v2.0.4 by @mathias */
/*! http://mths.be/placeholder v2.0.5 by @mathias */
;(function(window, document, $) {

var isInputSupported = 'placeholder' in document.createElement('input'),
Expand All @@ -19,15 +19,17 @@
} else {

placeholder = prototype.placeholder = function() {
return this
var $this = this;
$this
.filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
.not('.placeholder')
.bind({
'focus.placeholder': clearPlaceholder,
'blur.placeholder': setPlaceholder
})
.data('placeholder-enabled', true)
.trigger('blur.placeholder').end();
.trigger('blur.placeholder');
return $this;
};

placeholder.input = isInputSupported;
Expand Down
4 changes: 2 additions & 2 deletions jquery.placeholder.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c548851

Please sign in to comment.