mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-20 09:11:40 +01:00
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:
committed by
Jörn Zaefferer
parent
1e6184256d
commit
6eb3a576ed
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user