-
Notifications
You must be signed in to change notification settings - Fork 36
Description
I have the following javascript in-place to preselect items when a page loads. I'm using web2py and {{=fill_messages_saved}} returns an array [4, 144, 142, 143], which all correspond to values of the options I'd like to select. Unfortunately, the order is always displayed in the order generated in the portion of the html. Is there a way to load each item according to the array of values {{=fill_messages_saved}} as preselected options when a page loads? I can watch each item load individually with the alert() below, but they don't load top down.. they retain the order designated in the html. When I manually select the options, they show up correctly.
jQuery(document).ready(function(){
jQuery(function(