mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Checkboxradio: Fix invalid chars, remove unused var, add comment
This commit is contained in:
parent
dc2bede254
commit
2bf307313b
@ -59,6 +59,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
|
|||||||
|
|
||||||
labels = this.element.labels();
|
labels = this.element.labels();
|
||||||
|
|
||||||
|
// If there are multiple labels, use the last one
|
||||||
this.label = $( labels[ labels.length - 1 ] );
|
this.label = $( labels[ labels.length - 1 ] );
|
||||||
if ( !this.label.length ) {
|
if ( !this.label.length ) {
|
||||||
$.error( "No label found for checkboxradio widget" );
|
$.error( "No label found for checkboxradio widget" );
|
||||||
@ -152,11 +153,11 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
|
|||||||
_getRadioGroup: function() {
|
_getRadioGroup: function() {
|
||||||
var name = this.element[ 0 ].name;
|
var name = this.element[ 0 ].name;
|
||||||
var formParent = this.formParent[ 0 ];
|
var formParent = this.formParent[ 0 ];
|
||||||
var radios = $( [] );
|
|
||||||
|
|
||||||
if ( !name ) {
|
if ( !name ) {
|
||||||
return $( [] );
|
return $( [] );
|
||||||
}``
|
}
|
||||||
|
|
||||||
return this.formParent.find( "[name='" + $.ui.escapeSelector( name ) + "']" ).filter( function() {
|
return this.formParent.find( "[name='" + $.ui.escapeSelector( name ) + "']" ).filter( function() {
|
||||||
var form = $( this ).form();
|
var form = $( this ).form();
|
||||||
return ( form.length ? form : $( "body" ) )[ 0 ] === formParent;
|
return ( form.length ? form : $( "body" ) )[ 0 ] === formParent;
|
||||||
|
Loading…
Reference in New Issue
Block a user