jqueryjquery-uiselect-menu

jQuery UI Selectmenu events bind


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 ?


Solution

  • I found an answer. So here it is:

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