This code snippet is using the jQuery library to initialize a dual select box with the Bootstrap Dual Listbox plugin.

The $('.dual_select') selector selects the HTML element with the dual_select class.

The bootstrapDualListbox() function is called on this element to initialize the dual select box with the provided options:

  • nonSelectedListLabel specifies the label for the non-selected list.
  • selectedListLabel specifies the label for the selected list.
  • preserveSelectionOnMove specifies whether to preserve the selection when an item is moved. The value 'moved' means that the selection will be preserved when an item is moved.
  • moveOnSelect specifies whether to move the selected item immediately after it is selected. If set to false, an arrow will be displayed to indicate that only one item can be selected at a time.
  • filterTextClear specifies the text for the clear filter button.
  • moveSelectedLabel specifies the label for the move selected button.
  • moveAllLabel specifies the label for the move all button.
  • removeSelectedLabel specifies the label for the remove selected button.
  • removeAllLabel specifies the label for the remove all button.
  • infoText specifies the text format for the information about the number of items.
  • showFilterInputs specifies whether to display filter inputs for searching.
  • selectorMinimalHeight specifies the minimum height of the selector boxes.

The result is a dual select box with the specified labels, buttons, and options

$dual_selectbootstrapDualListbox nonSelectedListLabel 可选密钥模板 selectedListLabel 已选密钥模板 preserveSelectionOnMove moved moveOnSelect false 出现一个剪头表示可以

原文地址: http://www.cveoy.top/t/topic/i0pO 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录