mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-23 17:30:31 +00:00
enabled theming of select menu buttons through data-theme attr on select el. Fixes #149
This commit is contained in:
parent
4ff7738dbe
commit
35e97cc5df
2 changed files with 5 additions and 3 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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'>" +
|
||||
|
|
|
|||
Loading…
Reference in a new issue