JQuery: Removing the sorting from bootstrap selects

Hey!
Here is the documentation on bootstrap select: http://silviomoreto.github.io/bootstrap-select/

I'm far from an expert with jquery/javascript, but I only need a simple change done.

If you notice, when you select multiple items and they are displayed (screenshot : http://i.gyazo.com/0cdde439091d75db137221a679e93e39.png ) , the bootstrap select will automatically sort them alphabetically (I actually clicked Relish, Ketchup, Mustard in this order, but it sorted them as Mustard, Ketchup, Relish). This causes serious problems for a project I'm using this select for.

I tried to find the code responsible for this but was unable to.

Here is the bootstep select code which I assume is responsible for doing this: http://pastebin.com/UvS7dJgX (but maybe the sorting is something more internal in jquery?)

I'd really appreciate some help in finding the code responsible for this sorting so I can eliminate it!

Thank you!
stevedellAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobOwner (Aidellio)Commented:
The plugin hides the <select><option>...</option>...</select> and adds markup to display it as a nice dropdown with checkboxes.  As you select or deselect each option, the plugin in the background, selects/deselects the corresponding <option> elements.  When it updates the title it does it in the order that the <option> elements are in the <select>

e.g. if you have:

                <select class="selectpicker" multiple>
                    <option>Relish</option>
                    <option>Ketchup</option>
                    <option>Mustard</option>
                </select>

Then selecting all 3 will show "Relish, Ketchup, Mustard"

In otherwords you'd need to keep track of what's been selected in what order to be able to update the title on the button so it can't be done without modifying the plugin.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.