2012-09-12 88 views

回答

2

供應試着反饋功能,以處理所選擇的事件的init選項。

$('.selector').multiselect({ selected: function(event, ui) { alert($(ui.option).val() + " has been selected"); } }); 

$('.selector').multiselect({ deselected: function(event, ui) { alert($(ui.option).val() + " has been deselected"); } }); 

綁定到所選類型multiselectselected的事件。

$('.selector').bind('multiselectselected', function(event, options) { 
    ... // ui.option is the DOMOption node of ui.sender 
}); 

$('.selector').bind('multiselectdeselected', function(event, ui) { 
    ... // ui.option is the DOMOption node of ui.sender 
}); 
+0

謝謝,它完美的作品 – FeKuLa

0

$('#countries').mouseleave(function() { 
alert('Hi'); 
}); 
+1

它不起作用 – FeKuLa