jquery mobile - JQueryMobile - position and size of select menu -
i working on jquerymobile page. page contain select element (dropdown) custom menu. trying position menu right below select button , change width width of select button. further stylizing follow well.
in firebug figured out jqm changes css classes of select menu (here: select-choice-1-listbox-popup) position attributes. thought might proper approach element , change top attribute. doesn't work though. guess code executed because first alert not show value "top" attribute.
<script type="text/javascript"> function positionmenu() { alert(document.getelementbyid('select-choice-1-listbox-popup').style.top); // prints "" document.getelementbyid('select-choice-1-listbox-popup').style.top="300px"; alert(document.getelementbyid('select-choice-1-listbox-popup').style.top); // prints "300px" } </script>
[...]
<div onclick="positionmenu();" data-role="fieldcontain" style="width:300px;"> <label for="select-choice-1" class="select">choose shipping method:</label> <select data-native-menu=false name="select-choice-1" id="select-choice-1"> <option value="standard">standard: 7 day</option> <option value="rush">rush: 3 days</option> <option value="express">express: next day</option> <option value="overnight">overnight</option> </select> </div>
my question is: how can change attributes of select menu?
Comments
Post a Comment