Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

IE8 Doesn't like changing input type with jQuery

  • Loading branch information...
commit b3f60e4257262e165b59dd9072bbbb7601e53a8a 1 parent c27895e
@snikch authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/jquery.placeholder.js
View
6 src/jquery.placeholder.js
@@ -82,7 +82,8 @@
if (this.value == $el.attr('placeholder') && $el.hasClass(opts.activeClass)) $el.val('').removeClass(opts.activeClass).addClass(opts.focusClass);
if ($el.hasClass(opts.passwordClass)){
$el.removeClass(opts.passwordClass);
- $el.attr('type', 'password');
+ $el.get().type = 'password';
+
}
});
$el.bind('blur.placeholder', function() {
@@ -97,7 +98,8 @@
$el.val($el.attr('placeholder')).addClass(opts.activeClass);
if ($el.is(':password')){
$el.addClass(opts.passwordClass);
- $el.attr('type', 'text');
+ $el.get().type = 'text';
+
}
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.