Skip to content

Commit 54643c6

Browse files
committed
jquery.multiselect.js - add 'appendMenuTo' option
Add the 'appendMenuTo' option, to enable appending the menu to some other  parent element, other than the document's body. This is very helpful when trying to apply specific CSS or behavior to the menu. 
1 parent edf9886 commit 54643c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jquery.multiselect.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
hide: null,
4141
autoOpen: false,
4242
multiple: true,
43-
position: {}
43+
position: {},
44+
appendTo: document.body
4445
},
4546

4647
_create: function() {
@@ -68,7 +69,7 @@
6869
menu = (this.menu = $('<div />'))
6970
.addClass('ui-multiselect-menu ui-widget ui-widget-content ui-corner-all')
7071
.addClass(o.classes)
71-
.appendTo(document.body),
72+
.appendTo(o.appendMenuTo),
7273

7374
header = (this.header = $('<div />'))
7475
.addClass('ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix')

0 commit comments

Comments
 (0)