Skip to content

Commit

Permalink
Tag the v1.8.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Dec 6, 2011
1 parent c857b7c commit e8a1b12
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions jquery.placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
;(function(window, document, $) {

var isInputSupported = 'placeholder' in document.createElement('input'),
isTextareaSupported = 'placeholder' in document.createElement('textarea');
isTextareaSupported = 'placeholder' in document.createElement('textarea'),
prototype = $.fn,
placeholder;

if (isInputSupported && isTextareaSupported) {

$.fn.placeholder = function() {
placeholder = prototype.placeholder = function() {
return this;
};

$.fn.placeholder.input = $.fn.placeholder.textarea = true;
placeholder.input = placeholder.textarea = true;

} else {

$.fn.placeholder = function() {
placeholder = prototype.placeholder = function() {
return this
.filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
.not('.placeholder')
Expand All @@ -23,8 +25,8 @@
.trigger('blur.placeholder').end();
};

$.fn.placeholder.input = isInputSupported;
$.fn.placeholder.textarea = isTextareaSupported;
placeholder.input = isInputSupported;
placeholder.textarea = isTextareaSupported;

$(function() {
// Look for forms
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 e8a1b12

Please sign in to comment.