From 55222b1080c13dda4ef55985a2adb0d02b534a72 Mon Sep 17 00:00:00 2001 From: davidstutz Date: Mon, 2 Aug 2021 20:34:36 +0200 Subject: [PATCH] Fix #396 by providing example in documentation. --- index.html | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/index.html b/index.html index 75fe75bb..43d335fa 100644 --- a/index.html +++ b/index.html @@ -6816,6 +6816,90 @@

+

+ This examples shows how to make the filter/search input stick to the top: +

+ +
+ + + +
+
+
+ <script type="text/javascript">
+     $(document).ready(function() {
+         $('#example-form-group').multiselect({
+            enableFiltering: true,
+            maxHeight: 200,
+        });
+        $('.multiselect-container .multiselect-filter', $('#example-fix-filter').parent()).css({
+            'position': 'sticky', 'top': '0px', 'z-index': 1,
+        })
+     });
+ </script>
+ 
+ <div class="form-group">
+     <label for"example-form-group">Select</label>
+     <select id="example-form-group" multiple="multiple">
+         <option value="1">Option 1</option>
+         <option value="2">Option 2</option>
+         <option value="3">Option 3</option>
+         <option value="4">Option 4</option>
+         <option value="5">Option 5</option>
+         <option value="1">Option 1</option>
+         <option value="2">Option 2</option>
+         <option value="3">Option 3</option>
+         <option value="4">Option 4</option>
+         <option value="5">Option 5</option>
+         <option value="1">Option 1</option>
+         <option value="2">Option 2</option>
+         <option value="3">Option 3</option>
+         <option value="4">Option 4</option>
+         <option value="5">Option 5</option>
+         <option value="1">Option 1</option>
+         <option value="2">Option 2</option>
+         <option value="3">Option 3</option>
+         <option value="4">Option 4</option>
+         <option value="5">Option 5</option>
+     </select>
+ </div>
+ 
+
+