diff --git a/docs/index.html b/docs/index.html index c0fb37d..82539cc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -299,12 +299,12 @@

clearAll (boolean) - To display "Clear ALL" in multiselect (default: false) + To display "Clear all" in multiselect (default: false) - isCloseAfterClearAll + closeAfterClearAll (boolean) - Close dropdown after "Clear ALL (clearAll=true)" (default: false) + Close dropdown after clicking on "Clear all (clearAll=true)" (default: false) search diff --git a/docs/sumoselect_demo.html b/docs/sumoselect_demo.html index 107fe35..9404abb 100644 --- a/docs/sumoselect_demo.html +++ b/docs/sumoselect_demo.html @@ -1,522 +1,522 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - Jquery.sumoselect - Demo by Hemant Negi - - - - -
-
-

Jquery.sumoselect

-

A jQuery Single/Multi Select plugin which can be used on almost any device

- View project onGitHub -
-
- -
-
-
- -

-jquery.sumoselect - Demo

- -

First import a latest version of jquery in your page. Then the jquery.sumoselect.min.js and its css (sumoselect.min.css)

-
-
-<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
-<script src="jquery.sumoselect.min.js"><script>
-<link href="sumoselect.min.css" rel="stylesheet" />
-
-
-

- Simple

-

- Single select.

-
-
$('.testselect1').SumoSelect();
-
-
-
-

- Multiple select.

-
-
$('.testselect2').SumoSelect();
-
-
-
-
- -

- Optgroup Support

-

-

-
$('.optgroup_test').SumoSelect();
-
-
-
-
- - -

- Search Support

-

-

-
$('.search_test').SumoSelect({search: true, searchText: 'Enter here.'});
-
- -

- - -

- -
-
-
- - - -

- With placeholder text

-
- -

- Multiple select.

-
-
$('.testselect3').SumoSelect({placeholder: 'This is a placeholder'});
-
-
- -

 

-

 

- -

- Preselected and Disabled

- -

- Single select.

-
-
$('.testselect5').SumoSelect();
-
-
-
-

- Multiple select.

-
-
$('.testselect6').SumoSelect();
-
-
- -

 

- -

- Show ok cancel in multiselect

-
-
$('.testselect7').SumoSelect({ okCancelInMulti: true });
-
-

-  

- - -

- Clear selected options in multiselect

-
-
$('.multi-clean').SumoSelect({ clearAll: true });
-
-

-  

- - - -

- Clear selected options in multiselect and close dropdown

-
-
$('.multi-clean-close').SumoSelect({isCloseAfterClearAll: true, clearAll: true});
-
-

-

- - -

- Select All

-
-
$('.select1').SumoSelect({ okCancelInMulti: true, selectAll: true });
-
-

-  

- -
-
$('.select2').SumoSelect({ selectAll: true });
-
-

-  

- -

- Other Examples

- -
-
$('.testselect8').SumoSelect({ okCancelInMulti: true ,
-			       triggerChangeCombined: false
-			    });
-
-
-
-
- Try this one on a mobile.
-
$('.testselect9').SumoSelect({ okCancelInMulti: true ,
-			       triggerChangeCombined: true,
-			       forceCustomRendering: true	
-		    });
-
-

 

-

 

- Live actions on select. - - - - - - -
-
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • - -
-
- -
-
-
-
-
- - -

- License

- -

Copyright (c) 2014 Hemant Negi Licensed under the MIT license.

- - -
-
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + Jquery.sumoselect - Demo by Hemant Negi + + + + +
+
+

Jquery.sumoselect

+

A jQuery Single/Multi Select plugin which can be used on almost any device

+ View project onGitHub +
+
+ +
+
+
+ +

+jquery.sumoselect - Demo

+ +

First import a latest version of jquery in your page. Then the jquery.sumoselect.min.js and its css (sumoselect.min.css)

+
+
+<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
+<script src="jquery.sumoselect.min.js"><script>
+<link href="sumoselect.min.css" rel="stylesheet" />
+
+
+

+ Simple

+

+ Single select.

+
+
$('.testselect1').SumoSelect();
+
+
+
+

+ Multiple select.

+
+
$('.testselect2').SumoSelect();
+
+
+
+
+ +

+ Optgroup Support

+

+

+
$('.optgroup_test').SumoSelect();
+
+
+
+
+ + +

+ Search Support

+

+

+
$('.search_test').SumoSelect({search: true, searchText: 'Enter here.'});
+
+ +

+ + +

+ +
+
+
+ + + +

+ With placeholder text

+
+ +

+ Multiple select.

+
+
$('.testselect3').SumoSelect({placeholder: 'This is a placeholder'});
+
+
+ +

 

+

 

+ +

+ Preselected and Disabled

+ +

+ Single select.

+
+
$('.testselect5').SumoSelect();
+
+
+
+

+ Multiple select.

+
+
$('.testselect6').SumoSelect();
+
+
+ +

 

+ +

+ Show ok cancel in multiselect

+
+
$('.testselect7').SumoSelect({ okCancelInMulti: true });
+
+

+  

+ + +

+ Clear selected options in multiselect

+
+
$('.multi-clean').SumoSelect({ clearAll: true });
+
+

+  

+ + + +

+ Clear selected options in multiselect and close dropdown

+
+
$('.multi-clean-close').SumoSelect({closeAfterClearAll: true, clearAll: true});
+
+

+

+ + +

+ Select All

+
+
$('.select1').SumoSelect({ okCancelInMulti: true, selectAll: true });
+
+

+  

+ +
+
$('.select2').SumoSelect({ selectAll: true });
+
+

+  

+ +

+ Other Examples

+ +
+
$('.testselect8').SumoSelect({ okCancelInMulti: true ,
+			       triggerChangeCombined: false
+			    });
+
+
+
+
+ Try this one on a mobile.
+
$('.testselect9').SumoSelect({ okCancelInMulti: true ,
+			       triggerChangeCombined: true,
+			       forceCustomRendering: true	
+		    });
+
+

 

+

 

+ Live actions on select. + + + + + + +
+
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • + +
+
+ +
+
+
+
+
+ + +

+ License

+ +

Copyright (c) 2014 Hemant Negi Licensed under the MIT license.

+ + +
+
+ + + + diff --git a/jquery.sumoselect.js b/jquery.sumoselect.js index ee33e11..eaca6c5 100644 --- a/jquery.sumoselect.js +++ b/jquery.sumoselect.js @@ -66,11 +66,11 @@ }, noMatch: 'No matches for "{0}"', prefix: '', // some prefix usually the field name. eg. 'Hello' - locale: ['OK', 'Cancel', 'Select All', "Clear all"], // all text that is used. don't change the index. + locale: ['OK', 'Cancel', 'Select All', 'Clear all'], // all text that is used. don't change the index. up: false, // set true to open upside. showTitle: true, // set to false to prevent title (tooltip) from appearing clearAll: false, // im multi select - clear all checked options - isCloseAfterClearAll: false, // im multi select - close select after clear + closeAfterClearAll: false, // im multi select - close select after clear max: null, // Maximum number of options selected (when multiple) // eslint-disable-next-line no-unused-vars renderLi: (li, _originalOption) => li // Custom
  • item renderer @@ -334,7 +334,7 @@ O.selAll.on('click', () => { O.selAll.removeClass('selected'); O.toggSelAll(false, 1); - if (settings.isCloseAfterClearAll) { + if (settings.closeAfterClearAll) { O.hideOpts(); } });