enabled theming of select menu buttons through data-theme attr on select el. Fixes #149

This commit is contained in:
scottjehl 2010-10-11 16:41:30 -04:00
parent 4ff7738dbe
commit 35e97cc5df
2 changed files with 5 additions and 3 deletions

View file

@ -159,7 +159,7 @@
<div data-role="fieldcontain">
<label for="select-choice-3" class="select">Choose one:</label>
<select name="select-choice-3" id="select-choice-3">
<select name="select-choice-3" id="select-choice-3" data-theme="b">
<option value="Choice 1">Choice 1</option>
<option value="Choice 2">Choice 2</option>
<option value="Choice 3">Choice 3</option>

View file

@ -17,7 +17,8 @@ $.fn.customSelect = function(options){
//extendable options
o = $.extend({
closeText: "close",
chooseText: label.text()
chooseText: label.text(),
theme: select.data("theme")
}, options),
buttonId = selectID + "-button",
@ -37,7 +38,8 @@ $.fn.customSelect = function(options){
.insertBefore( select )
.buttonMarkup({
iconpos: 'right',
icon: 'arrow-d'
icon: 'arrow-d',
theme: o.theme
}),
menuPage = $( "<div data-role='dialog' data-theme='a'>" +
"<div data-role='header' data-theme='b'>" +