Skip to content

Commit

Permalink
Get rid of an unused argument in setPlaceholder(). Also, shorten th…
Browse files Browse the repository at this point in the history
…e header comment a bit.
  • Loading branch information
mathiasbynens committed Jul 7, 2011
1 parent 08c077f commit 345c7e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
12 changes: 4 additions & 8 deletions jquery.placeholder.js
Original file line number Diff line number Diff line change
@@ -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'),
Expand Down Expand Up @@ -69,7 +65,7 @@
}
}

function setPlaceholder(elem) {
function setPlaceholder() {
var $replacement,
$input = $(this),
$origInput = $input,
Expand All @@ -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')
Expand Down
8 changes: 2 additions & 6 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 345c7e6

Please sign in to comment.