Jquery 引导全屏选择fire onchange事件?
我使用全屏选择选项 它不能在一次改变事件中开火,知道吗Jquery 引导全屏选择fire onchange事件?,jquery,Jquery,我使用全屏选择选项 它不能在一次改变事件中开火,知道吗 <select name="select_year" id="select_year" class="form-control mobileSelect"> <option value='abc'> abc </option> </select> $(document).ready(function() { $('#s
<select name="select_year" id="select_year" class="form-control mobileSelect">
<option value='abc'> abc </option>
</select>
$(document).ready(function()
{
$('#select_year').on('change', function() {
alert( "asdaS" );
})
});
内部:
$('.mobileSelect').mobileSelect({
animation: 'scale',
animationSpeed: 400,
});
成为:
$('.mobileSelect').mobileSelect({
animation: 'scale',
animationSpeed: 400,
onClose: function(){
alert('onClose: '+$(this).val());
},
onOpen: function(){
alert('onOpen: '+this.val());
}
});
因为它触发了自己的事件:谢谢。它起作用了。
$('.mobileSelect').mobileSelect({
animation: 'scale',
animationSpeed: 400,
onClose: function(){
alert('onClose: '+$(this).val());
},
onOpen: function(){
alert('onOpen: '+this.val());
}
});