'select all' and 'remove all' with chosen.js

前端 未结 7 1710
深忆病人
深忆病人 2020-12-24 12:29

For the select menu plugin chosen.js, is there an established way to add \'select all items in list\' or \'remove all items in list\' feature to a multiple select input? In

7条回答
  •  孤城傲影
    2020-12-24 13:14

    $("#ctrlName option:selected").removeAttr("selected").trigger('liszt:updated'); 
    

    clear all

    $("#ctrlName option").attr("selected","selected").trigger('liszt:updated'); 
    

    select all

提交回复
热议问题