improved defaults and added a demo page showing that all button data attrs work on selects too

This commit is contained in:
scottjehl 2010-11-10 23:04:10 -05:00
parent 532c918a26
commit 049afd4568
2 changed files with 14 additions and 6 deletions

View file

@ -112,8 +112,16 @@
</div>
<h2>Data attribute support</h2>
<p>You can specify any jQuery Mobile button data- attribute on a select element too.</p>
<div data-role="fieldcontain">
<label for="select-choice-3" class="select">Actions</label>
<select name="select-choice-3" id="select-choice-3" data-theme="a" data-icon="gear" data-inline="true">
<option value="edit">Edit</option>
<option value="delete">Delete</option>
</select>
</div>
</form>

View file

@ -7,14 +7,14 @@
(function ( $ ) {
$.widget( "mobile.selectmenu", $.mobile.widget, {
options: {
theme: undefined,
theme: null,
disabled: false,
icon: 'arrow-d',
iconpos: 'right',
inline: undefined,
corners: undefined,
shadow: undefined,
iconshadow: undefined
inline: null,
corners: true,
shadow: true,
iconshadow: true
},
_create: function(){