Solved! Go to Solution.
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Test</title> <link href="http://js.arcgis.com/3.8/js/esri/css/esri.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css" /> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"></script> <style> .mySelect{ color: #333; } </style> </head> <body> <div data-role="page"> <label for="my_combo">Combo</label> <select id="my_combo" name="my_combo" class="mySelect" data-inline="true"></select> </div> <script> function loadSelectMenu(elem, sa) { var i; var e = $("#" + elem); for (i = 0; i < sa.length; i++) { e.append('<option value="' + sa + '">' + sa +'</option>'); } } loadSelectMenu("my_combo", ["Blue", "Red", "Green", "Yellow", "Magenta"]); </script> </body> </html>
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Test</title> <link href="http://js.arcgis.com/3.8/js/esri/css/esri.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css" /> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"></script> <style> .mySelect{ color: #333; } </style> </head> <body> <div data-role="page"> <label for="my_combo">Combo</label> <select id="my_combo" name="my_combo" class="mySelect" data-inline="true"></select> </div> <script> function loadSelectMenu(elem, sa) { var i; var e = $("#" + elem); for (i = 0; i < sa.length; i++) { e.append('<option value="' + sa + '">' + sa +'</option>'); } } loadSelectMenu("my_combo", ["Blue", "Red", "Green", "Yellow", "Magenta"]); </script> </body> </html>