]> source.dussan.org Git - jquery-ui.git/commitdiff
fixed: problem (mainly in <= IE7) when select has no id, thx Ryzo and cburgdorf,...
authorFelix Nagel <info@felixnagel.com>
Mon, 6 Jun 2011 23:07:04 +0000 (01:07 +0200)
committerFelix Nagel <info@felixnagel.com>
Mon, 6 Jun 2011 23:07:04 +0000 (01:07 +0200)
ui/jquery.ui.selectmenu.js

index 70c5d9ff0455e448aa88ae0fa69cb5f57a03bb94..061a979e3b0b0c85d11dfe912a630969b56c2885 100644 (file)
@@ -68,9 +68,9 @@ $.widget("ui.selectmenu", {
                this.newelement.prepend('<span class="' + self.widgetBaseClass + '-status" />');
 
                // make associated form label trigger focus
-               $('label[for="' + this.element.attr('id') + '"]')
-                       .attr('for', this.ids[0])
-                       .bind('click.selectmenu', function() {
+               $( 'label[for="' + selectmenuId + '"]' )
+                       .attr( 'for', this.ids[0] )
+                       .bind( 'click.selectmenu', function() {
                                self.newelement[0].focus();
                                return false;
                        });