multi-select.js 986 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. (function($) {
  2. "use strict";
  3. //basic
  4. $('.multi-select').multipleSelect();
  5. //optiongroup
  6. $('.optmulti-select').multipleSelect({
  7. multiple: true,
  8. multipleWidth: 55,
  9. width: '100%'
  10. });
  11. //Multiple Items
  12. $('.multiselect').multipleSelect({
  13. width: 460,
  14. multiple: true,
  15. multipleWidth: 55
  16. });
  17. //hide selectall
  18. $('.hide-select').multipleSelect({
  19. selectAll: false
  20. });
  21. //Single Row
  22. $('.single-select').multipleSelect({
  23. single: true
  24. });
  25. //filter-multiple
  26. $('.filter-multi').multipleSelect({
  27. filter: true
  28. })
  29. //group-filter
  30. $('.group-filter').multipleSelect({
  31. filter: true,
  32. multiple: true
  33. });
  34. //custom
  35. $('.custom-multiselect').multipleSelect({
  36. styler: function(value) {
  37. if (value == '1') {
  38. return 'background-color: #5e2dd8 ; color: #ffffff;';
  39. }
  40. if (value == '6') {
  41. return 'background-color: #32cafe; color: #ffffff;';
  42. }
  43. if (value == '10') {
  44. return 'background-color: #ff7088; color: #ffffff;';
  45. }
  46. }
  47. });
  48. })(jQuery);