plainblack.com
Username Password
search
Bookmark and Share

Thingy Select List Alphabetizer

This bit of JavaScript uses jQuery to re-sort the options within select lists. It was initially developed as a work-around for the fact that Thingy select lists are "randomized", making it difficult to find the item you want to select when lists are long.

See bug #12355

Use of this JavaScript is pretty simple: add the code to the header of templates used to display your Thingy search and edit screens. The default configuration of the script sorts ALL the select lists on the page. If you want to limit sorting to only select lists within a certain container, give that container and ID, and then modify the jQuery selector to find only the select lists within.

If you're new to jQuery, the syntax is similar to how CSS defines which objects a rule apply to. In the example in this script, $("#selectContainer select") finds all select elements within the element that has its ID set to "selectContainer". The script then iterates through each select element and sorts the options within.

This script downloads the latest jQuery from jquery.com. You are welcome to server a local copy instead -- just update the src in the initial script tag.

Comments
DownloadjQ_select_sort.js jQ_select_sort.js
LinksNo Support Offered
Statistics Downloads: 1345
Views: 6176
Rating: 0
Updated: 4/19/2012
Keywords
NavigationMore from Trex
Back to the Bazaar
© 2023 Plain Black Corporation | All Rights Reserved