claviska/jquery-selectBox — Issue #37: Code addition to help with styling
Author: pfriedl
Created: 2011-11-16 02:28:23+00:00
State: open

We've been having problems with setting select widths, and to be honest, accessing the custom select once it was created. However, we were able to overcome this by adding an ID to the dropdown.

After line 139 in the unminified js file, we added this chunk of code:

.attr('id', 'selectBox-'+select.attr('id') || '')

the result is the tag with the class "selectBox default selectBox-dropdown" would have the ID of "selectBox-" plus the ID of the select we're wrapping.

We've tested this, and this allows you to inividually style the selects, more specifically, the width. WOOT! Please add this to the code!