更新时间:2023-01-20 15:08:17
根据 ScrollectBox ,你必须使用 onSelectEvent
属性,如下所示:
According to the source code for ScrollectBox, you must use the onSelectEvent
property, like so:
jQuery(document).ready(function($){
$(".selection").scrollectBox({
preset: 'dropdown',
numVisibleOptions: 4,
scrollInterval: 150,
scrollOn: 'hover',
onSelectEvent: function (item, event) {
alert(item.val());
}
});
});