]> source.dussan.org Git - jquery-ui.git/commitdiff
Checkboxradio: Fix invalid chars, remove unused var, add comment
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Tue, 6 Oct 2015 13:42:24 +0000 (15:42 +0200)
committerAlexander Schmitz <arschmitz@gmail.com>
Thu, 8 Oct 2015 18:02:59 +0000 (14:02 -0400)
ui/widgets/checkboxradio.js

index 88b2f784d6496523f7fe8cac36211c19264b92d9..6bdd858dbd0bf90dcfaedceeca90dd17a5fcee43 100644 (file)
@@ -59,6 +59,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
 
                labels = this.element.labels();
 
+               // If there are multiple labels, use the last one
                this.label = $( labels[ labels.length - 1 ] );
                if ( !this.label.length ) {
                        $.error( "No label found for checkboxradio widget" );
@@ -152,11 +153,11 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
        _getRadioGroup: function() {
                var name = this.element[ 0 ].name;
                var formParent = this.formParent[ 0 ];
-               var radios = $( [] );
 
                if ( !name ) {
                        return $( [] );
-               }``
+               }
+
                return this.formParent.find( "[name='" + $.ui.escapeSelector( name ) + "']" ).filter( function() {
                        var form = $( this ).form();
                        return ( form.length ? form : $( "body" ) )[ 0 ] === formParent;