jQuery UI Selectmenu events bind

Bounce picture Bounce · Feb 8, 2012 · Viewed 12.4k times · Source

Im using JQuery UI Selectmenu widget - http://wiki.jqueryui.com/w/page/12138056/Selectmenu

Im trying to bind change event. But it does not work:

$(function() {
  $('select#items').selectmenu();
  $('select#items').bind("change",function(){
     alert('x');
   });  
});

Any ideas ?

Answer

Bounce picture Bounce · Feb 8, 2012

I found an answer. So here it is:

$(function() {      
        $('#items').selectmenu({
            change: function() {
                alert('x');
            }
        });
});