Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 引导全屏选择fire onchange事件?_Jquery - Fatal编程技术网

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());
    }
});