soundasleep / jquery-dropdown

Bootstrap-style dropdowns with some added features and no dependencies.
Other
767 stars 268 forks source link

Bug with preexisting values. #88

Closed NVentimiglia closed 9 years ago

NVentimiglia commented 9 years ago

Does not respect initial values. For instance I have a form which has a default selection (from a previous submission). This value is correct and present without the plugin. When I apply the plugin the selection is nulled and the .val() is incorrect.

It would be nice if the plugin respected preexisting values.

claviska commented 9 years ago

What values are you referring to?

NVentimiglia commented 9 years ago

Here is my code.

<select class="form-control select width-150" id="RoleState" name="RoleState">
<option value="">Role State</option>
<option value="0">Pending</option>
<option selected="selected" value="1">Approved</option>
<option value="2">Rejected</option>
</select>

After I apply .dropdown() the selection becomes the first (RoleState).

claviska commented 9 years ago

This plugin doesn't work on <select> elements. Are you posting on the right project?

http://labs.abeautifulsite.net/jquery-dropdown/

NVentimiglia commented 9 years ago

Ooh damn, sorry about that.