Skip to content

Commit 03cd4c9

Browse files
staabmjzaefferer
authored andcommitted
Core: Use plain element instead of un-wrapping the element again
Closes #1060
1 parent 5c3e46a commit 03cd4c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,14 +883,14 @@ $.extend($.validator, {
883883
attributeRules: function( element ) {
884884
var rules = {},
885885
$element = $(element),
886-
type = $element[0].getAttribute("type"),
886+
type = element.getAttribute("type"),
887887
method, value;
888888

889889
for (method in $.validator.methods) {
890890

891891
// support for <input required> in both html5 and older browsers
892892
if ( method === "required" ) {
893-
value = $element.get(0).getAttribute(method);
893+
value = element.getAttribute(method);
894894
// Some browsers return an empty string for the required attribute
895895
// and non-HTML5 browsers might have required="" markup
896896
if ( value === "" ) {

0 commit comments

Comments
 (0)