jQuery change event being called twice

后端 未结 9 1094
滥情空心
滥情空心 2020-12-05 23:03

I have a form with some input and select boxes, each has class=\"myClass\". I also have the following script:

$(document).ready(function() {
            


        
9条回答
  •  一生所求
    2020-12-05 23:27

    The only one that worked for me was unbind before the change check.

     $(".select2Component").unbind(); 
        $(".select2Component").change(function() { 
             //code
        });
    

提交回复
热议问题