我想在页面加载时模拟更改事件,但我尝试了一些事情并且没有任何作用(:
jQuery(function($){
var data = $('[name="carriage"]').data('kendoDropDownList');
data.setOptions({
'change':function(v) {
$('[id^="carriageWindow"]').css('display','none');
$('#carriageWindow' + v.sender.value()).css('display','block');
}
});
data.select(1); //not works
data.bind("change"); //not works
data.change(); //not works
});
答案 0 :(得分:2)
试试这个:
// select second option
data.select(1);
// trigger change event
data.trigger('change');