forked from WilliamStam/jQuery-UI-select-menu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
74 lines (60 loc) · 1.8 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
------ Changes ------
0.0.3 - 2011-01-01 - made it compatible with UI.. now it makes use of ui's theme
Usage and examples:
$("select").selectmenu({
speed: 400,
maxHeight: 300,
direction: "", // dont set to use the collision flip method. available options "up / down / blank ( "" )"
before: function(){
alert("im running at the start") // can use $(this) here
},
after: function(){
alert("im running at the end of the plugin when its all been set up") // can use $(this) here
},
change: function(){
alert("my new value is" + $(this).val())
}
});
if you do stuff to the list inside the after.. like hide some results.. then re-position the menu by calling
$("#myselect").selectmenu("position")
this re-aligns the menu to its propper place
---------------------------------------------------------------------------------
CSS needed for the menus feel free to change the colours etc in this..
.ui-selectmenu-area {
position:relative;
}
.ui-selectmenu-list {
list-style:none;
list-style-position:outside;
padding:0px;
margin:0px;
position:absolute;
overflow-y:auto;
text-align:left;
display:block;
visibility:hidden;
}
.ui-selectmenu-list ul {
list-style:none;
list-style-position:outside;
padding:0px;
margin:0px;
}
.ui-selectmenu-list li {
border:transparent 1px solid;
}
.ui-selectmenu-list li:not(.group) {
padding:3px;
cursor:pointer;
}
.ui-selectmenu-list li.group li {
padding-left:10px;
}
/* change to however you want it to look like */
.ui-selectmenu-list .ui-widget-header {
padding:3px;
font-variant:small-caps;
padding-left:2px;
margin-bottom:1px;
}
This file was modified by JetBrains PhpStorm (PhpStorm) PS-103.78 for binding GitHub repository