mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
Selectmenu: removed option wrapperElement
This commit is contained in:
parent
bf7394e50e
commit
a9aef0974b
@ -17,11 +17,13 @@
|
||||
$('select#speed').selectmenu({
|
||||
dropdown: false
|
||||
});
|
||||
$('select#number').selectmenu({
|
||||
dropdown: false,
|
||||
wrapperElement: '<div class="overflow"/>'
|
||||
var withOverflow = $('select#number').selectmenu({
|
||||
dropdown: false
|
||||
});
|
||||
withOverflow.selectmenu("widget").addClass("overflow");
|
||||
|
||||
$('select#files').selectmenu();
|
||||
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
|
@ -17,10 +17,10 @@
|
||||
$('select#speed').selectmenu({
|
||||
dropdown: false
|
||||
});
|
||||
$('select#number').selectmenu({
|
||||
dropdown: false,
|
||||
wrapperElement: '<div class="overflow"/>'
|
||||
var withOverflow = $('select#number').selectmenu({
|
||||
dropdown: false
|
||||
});
|
||||
withOverflow.selectmenu("widget").addClass("overflow");
|
||||
$('select#files').selectmenu();
|
||||
var files2 = $('select#files2').selectmenu();
|
||||
|
||||
|
9
ui/jquery.ui.selectmenu.js
vendored
9
ui/jquery.ui.selectmenu.js
vendored
@ -21,7 +21,6 @@ $.widget( "ui.selectmenu", {
|
||||
defaultElement: "<select>",
|
||||
options: {
|
||||
dropdown: true,
|
||||
wrapperElement: "<div />",
|
||||
appendTo: "body",
|
||||
position: {
|
||||
my: "left top",
|
||||
@ -110,7 +109,7 @@ $.widget( "ui.selectmenu", {
|
||||
});
|
||||
|
||||
// wrap and insert new button
|
||||
that.newelementWrap = $( options.wrapperElement )
|
||||
that.newelementWrap = $( '<div />' )
|
||||
.append( that.newelement )
|
||||
.insertAfter( that.element );
|
||||
},
|
||||
@ -150,7 +149,7 @@ $.widget( "ui.selectmenu", {
|
||||
});
|
||||
|
||||
// wrap list
|
||||
that.listWrap = $( options.wrapperElement )
|
||||
that.listWrap = $( '<div />' )
|
||||
.addClass( that.widgetBaseClass + '-menu' )
|
||||
.width( setWidth )
|
||||
.append( that.list )
|
||||
@ -405,6 +404,10 @@ $.widget( "ui.selectmenu", {
|
||||
}
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.newelementWrap.add( this.listWrap );
|
||||
},
|
||||
|
||||
_initSource: function() {
|
||||
var data = [];
|
||||
$.each( this.element.find( 'option' ), function( index, item ) {
|
||||
|
Loading…
Reference in New Issue
Block a user