Untitled

mail@pastecode.io avatar
unknown
plain_text
17 days ago
579 B
1
Indexable
Never
jQuery(document).ready(function($) {
    "use strict";
    $(".slimSelectSearchStartsWith select").addClass("frm_slimselect");
    var element = $(".slimSelectSearchStartsWith select");
    for (let i=0;i<element.length;i++) { 
        var elementToSlim = element[i]; 
        new SlimSelect({ 
               select:elementToSlim, 
               events: { 
                    searchFilter: (obj, search ) => {
                      return obj.text.toLowerCase().indexOf(search.toLowerCase()) === 0
                   }
              }
        });
    }
});
Leave a Comment