Tutorial :jQuery SelectMenu closes after click



Question:

I just updated to jQuery 1.4.2 & jQueryUI 1.8.2 w/the google cdn and now my jQuery selectmenu closes abruptly right after you click it.

I have a basic select and am instantiating it like so:

$('#myselectid').selectmenu({ maxHeight: 300 });  

I should also point out that if I change the jQuery version to 1.3.2 and the jQueryUI version to 1.7.2 then it works...

Any ideas would be greatly appreciated, thanks,

Justin


Solution:1

Change:

    this.newelement          .bind('mousedown', function(event){              self._toggle(event);              //make sure a click won't open/close instantly              if(o.style == "popup"){                  self._safemouseup = false;                  setTimeout(function(){self._safemouseup = true;}, 300);              }              return false;          })          .bind('click',function(){              return false;          })  

To:

    this.newelement          .bind('click', function(event){              self._toggle(event);              //make sure a click won't open/close instantly              if(o.style == "popup"){                  self._safemouseup = false;                  setTimeout(function(){self._safemouseup = true;}, 300);              }              return false;          })  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »