Permalink
Browse files

Get rid of an unused argument in `setPlaceholder()`. Also, shorten th…

…e header comment a bit.
  • Loading branch information...
1 parent 08c077f commit 345c7e6cd1c287127ac3cb20417960b6b09a7e47 @mathiasbynens committed Jul 7, 2011
Showing with 6 additions and 14 deletions.
  1. +4 −8 jquery.placeholder.js
  2. +2 −6 jquery.placeholder.min.js
View
@@ -1,8 +1,4 @@
-/*!
- * HTML5 Placeholder jQuery Plugin v1.8.3
- * @link http://mths.be/placeholder
- * @author Mathias Bynens <http://mathiasbynens.be/>
- */
+/*! http://mths.be/placeholder v1.8.4 by @mathias */
;(function($) {
var isInputSupported = 'placeholder' in document.createElement('input'),
@@ -69,7 +65,7 @@
}
}
- function setPlaceholder(elem) {
+ function setPlaceholder() {
var $replacement,
$input = $(this),
$origInput = $input,
@@ -78,9 +74,9 @@
if ($input.is(':password')) {
if (!$input.data('placeholder-textinput')) {
try {
- $replacement = $input.clone().attr({ type: 'text' });
+ $replacement = $input.clone().attr({ 'type': 'text' });
} catch(e) {
- $replacement = $('<input>').attr($.extend(args(this), { type: 'text' }));
+ $replacement = $('<input>').attr($.extend(args(this), { 'type': 'text' }));
}
$replacement
.removeAttr('name')

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 345c7e6

Please sign in to comment.