Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.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 Selected AngularJS添加一个全选选项_Jquery_Jquery Chosen - Fatal编程技术网

向Jquery Selected AngularJS添加一个全选选项

向Jquery Selected AngularJS添加一个全选选项,jquery,jquery-chosen,Jquery,Jquery Chosen,我正在尝试向Selected添加一个全选选项。出于某种原因,我只能选择下一个待选择的选项,而不是所有选项。有什么想法吗 // select all chosen $(document).on('click', '.group-result', function() { //modify this to be based off of superheroes var unselected = $(this).nextUntil('.group-result').not('

我正在尝试向Selected添加一个全选选项。出于某种原因,我只能选择下一个待选择的选项,而不是所有选项。有什么想法吗

 // select all chosen
    $(document).on('click', '.group-result', function() { //modify this to be based off of superheroes
        var unselected = $(this).nextUntil('.group-result').not('.result-selected');
        if(unselected.length) {
            unselected.trigger('mouseup'); //bug - only selects one at a time
        }
    });