]> source.dussan.org Git - jquery-ui.git/commitdiff
fixed: minor code bugfixes, thx to chrispatterson, see https://github.com/fnagel...
authorFelix Nagel <info@felixnagel.com>
Mon, 31 Jan 2011 22:40:00 +0000 (23:40 +0100)
committerFelix Nagel <info@felixnagel.com>
Mon, 31 Jan 2011 22:40:00 +0000 (23:40 +0100)
ui/jquery.ui.selectmenu.js

index 3da92471f45f5584310b3cdfb32f338acfa0cb4c..f860b0efcd53b3eb4df3ab6770c1ff74890f7948 100644 (file)
@@ -375,7 +375,7 @@ $.widget("ui.selectmenu", {
                this._optionLis = this.list.find('li:not(.' + self.widgetBaseClass + '-group)');
                                                
                // transfer disabled state
-               if (this.element.attr('disabled') == true) {
+               if (this.element.attr('disabled') === true) {
                        this.disable();
                }
 
@@ -432,7 +432,7 @@ $.widget("ui.selectmenu", {
                this.list.find('li a').each(function(i) {
                        if (!focusFound) {
                                var thisText = $(this).text();
-                               if ( thisText.indexOf(C) == 0 || thisText.indexOf(c) == 0 ) {
+                               if ( thisText.indexOf(C) === 0 || thisText.indexOf(c) === 0 ) {
                                        if (self._prevChar[0] == C) {
                                                if (self._prevChar[1] < i) {
                                                        focusOpt(this, i);
@@ -577,11 +577,10 @@ $.widget("ui.selectmenu", {
                        this.close();
                        this.element
                                .add(this.newelement)
-                               .add(this.list)
-                                       [value ? 'addClass' : 'removeClass'](
-                                               this.widgetBaseClass + '-disabled' + ' ' +
-                                               this.namespace + '-state-disabled')
-                                       .attr("aria-disabled", value);
+                               .add(this.list)[value ? 'addClass' : 'removeClass'](
+                                       this.widgetBaseClass + '-disabled' + ' ' +
+                                       this.namespace + '-state-disabled')
+                               .attr("aria-disabled", value);
                }
        },