JQuery Mobile Select Box not working
18,258
Solution 1
If you look at the source of the web page you can see it's in a form tag:
<form action="#" method="get">
So Adding this between the form tags would get the desired results: Live Example Link
<form action="#" method="get">
<div data-role="fieldcontain">
<label for="select-choice-1" class="select">Choose shipping method:</label>
<select 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>
</form>
Another problem it could be:
Try adding this tag to the dropdown: Live Example Link
data-native-menu="false"
Solution 2
I had the same problem and the decision is in the connected libraries
I include in head tag this css
code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css
and this
code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js
and all works well!
Related videos on Youtube
Author by
Satch3000
Updated on June 04, 2022Comments
-
Satch3000 almost 2 years
This is getting a bit crazy. I have been trying the code for hours now and no luck:
<div data-role="fieldcontain"> <label for="select-choice-1" class="select">Choose shipping method:</label> <select 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>
From:
http://jquerymobile.com/demos/1.0a4.1/#docs/forms/forms-selects.html
When I test it on my mobile there is no dropdown ... actually, nothing hapens at all.
I'm I forgetting something?
-
Phillip Kovalev almost 13 yearsWhat is you mobile browser or platform?
-
-
Satch3000 almost 13 yearsYes, it is ... Is that not an example?
-
mcgrailm almost 13 yearsit is an example and if thats the exact markup you used thets great but if its not then we need to see the markup you did use. also still wondering about including the files