Core: Use element.name and element.type consistently

Instead of using the jquery provided method, we use the native ones
instead. we already rely on them in other places, therefore we don't get
anything from using them here.

Closes #1096
This commit is contained in:
Markus Staab
2014-04-28 15:11:48 +02:00
committed by Jörn Zaefferer
parent 1e6184256d
commit 6eb3a576ed

View File

@@ -550,10 +550,10 @@ $.extend($.validator, {
elementValue: function( element ) {
var val,
$element = $(element),
type = $element.attr("type");
type = element.type;
if ( type === "radio" || type === "checkbox" ) {
return $("input[name='" + $element.attr("name") + "']:checked").val();
return $("input[name='" + element.name + "']:checked").val();
}
val = $element.val();