Skip to content

Commit

Permalink
Fixed clone() issue in IE
Browse files Browse the repository at this point in the history
IE doesn't allow changing an elements type so clone() wont work when creating the placeholder field.
  • Loading branch information
danbentley committed Jun 14, 2011
1 parent c755d03 commit 9812706
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/jquery.placeholder.js
Expand Up @@ -69,12 +69,12 @@
}

function createPasswordPlaceholder(input) {
return input.clone().attr({
return $('<input>').attr({
id: 'password-placeholder' + input.attr('name'),
placeholder: input.attr('placeholder'),
value: input.attr('placeholder'),
type: 'input',
readonly: true
});
}).addClass(input.attr('class'));
}

function clearPlaceholdersBeforeSubmit(form) {
Expand Down

0 comments on commit 9812706

Please sign in to comment.