aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-01-18 01:23:48 +0100
committerFelix Nagel <info@felixnagel.com>2012-01-18 01:23:48 +0100
commit7021f157b5ef6a12e7096264d31ea0850ad97917 (patch)
tree9a9f75ddf7ee65c105aaa99a9d04b42b91a6f8ee
parent7dd8c0844b769e6ea12e28cc610c7665d1243dd0 (diff)
downloadjquery-ui-7021f157b5ef6a12e7096264d31ea0850ad97917.tar.gz
jquery-ui-7021f157b5ef6a12e7096264d31ea0850ad97917.zip
removed: option wrapperElement, use widget method instead (see default demo)
-rw-r--r--demos/selectmenu/default.html9
-rw-r--r--ui/jquery.ui.selectmenu.js17
2 files changed, 13 insertions, 13 deletions
diff --git a/demos/selectmenu/default.html b/demos/selectmenu/default.html
index dd513554a..90ce9d2f6 100644
--- a/demos/selectmenu/default.html
+++ b/demos/selectmenu/default.html
@@ -18,9 +18,8 @@
body {font-size: 62.5%; font-family:"Verdana",sans-serif; }
fieldset { border:0; }
label,select,.ui-select-menu { float: left; margin-right: 10px; }
- select { width: 200px; }
- .wrap span.ui-selectmenu-item-header,
- .wrap ul.ui-selectmenu-menu li a { text-decoration: underline !important; }
+ select { width: 200px; }
+ .wrap ul.ui-selectmenu-menu-popup li a { font-weight: bold; }
</style>
<script type="text/javascript">
$(function(){
@@ -28,9 +27,9 @@
$('select#speedAa').selectmenu({
style:'popup',
- maxHeight: 150,
- wrapperElement: "<div class='wrap' />"
+ maxHeight: 150
});
+ $('select#speedAa').selectmenu("widget").addClass("wrap");
$('select#speedB').selectmenu({
style:'popup',
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index e8b78f074..cc75ce87e 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -31,9 +31,7 @@ $.widget("ui.selectmenu", {
icons: null,
format: null,
escapeHtml: false,
- bgImage: function() {},
- wrapperElement: "<span />",
- listWrapperElement: "<div />"
+ bgImage: function() {}
},
_create: function() {
@@ -59,7 +57,7 @@ $.widget("ui.selectmenu", {
'aria-haspopup': true,
'aria-owns': this.ids[ 2 ]
});
- this.newelementWrap = $( o.wrapperElement )
+ this.newelementWrap = $( "<span />" )
.append( this.newelement )
.insertAfter( this.element );
@@ -203,10 +201,9 @@ $.widget("ui.selectmenu", {
'aria-labelledby': this.ids[1],
'id': this.ids[2]
});
- this.listWrap = $( o.listWrapperElement )
- .addClass( self.widgetBaseClass + '-menu' )
- .append( this.list )
- .appendTo( 'body' );
+ this.listWrap = $( "<div />", {
+ 'class': self.widgetBaseClass + '-menu'
+ }).append( this.list ).appendTo( 'body' );
// transfer menu click to menu button
this.list
@@ -614,6 +611,10 @@ $.widget("ui.selectmenu", {
if (this._disabled(event.currentTarget)) { return false; }
this._trigger("select", event, this._uiHash());
},
+
+ widget: function() {
+ return this.listWrap.add( this.newelementWrap );
+ },
_closeOthers: function(event) {
$('.' + this.widgetBaseClass + '.ui-state-active').not(this.newelement).each(function() {