Skip to content

Instantly share code, notes, and snippets.

@lukegalea
Created February 5, 2011 01:34
Show Gist options
  • Save lukegalea/812108 to your computer and use it in GitHub Desktop.
Save lukegalea/812108 to your computer and use it in GitHub Desktop.
JQM Data Native Broken
<html>
<head>
<title>Pumper</title>
<link rel="stylesheet" href=
"http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css"
type="text/css">
<script src="http://code.jquery.com/jquery-1.5.min.js" type=
"text/javascript">
</script>
<script src=
"http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"
type="text/javascript">
</script>
</head>
<body>
<div data-role="page" id="observations_new">
<div data-role="header" data-position="fixed">
<h1>New Observation</h1>
</div>
<div data-role="content" class="command-no-cache">
<form action="/observations" method="post">
<fieldset >
<div id="time_label_select" data-role="fieldcontain">
<label for="time_label_choice">When</label><select id=
"time_label_choice" name="observation[time_label]"
data-native="true">
<option value="Wake Up" selected="selected">
Wake Up
</option>
<option value="Breakfast">
Breakfast
</option>
<option value="Post-Breakfast">
Post-Breakfast
</option>
<option value="Lunch">
Lunch
</option>
<option value="Post-Lunch">
Post-Lunch
</option>
<option value="Dinner">
Dinner
</option>
<option value="Post-Dinner">
Post-Dinner
</option>
<option value="Snack">
Snack
</option>
<option value="Post-Snack">
Post-Snack
</option>
<option value="Correction">
Correction
</option>
<option value="Other">
Other
</option>
</select>
</div>
</div>
</div>
</body>
</html>
@scottjehl
Copy link

both of those option names have since been changed for consistency. It's now data-native-menu="true" and the option is nativeMenu. Here's the documentation:
http://jquerymobile.com/demos/1.0a3/#docs/forms/forms-selects.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment