Skip to content

Commit 6784e46

Browse files
committed
Update docs and readme
1 parent 576dcc2 commit 6784e46

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Font-Awesome icons used from [encharm/Font-Awesome-SVG-PNG](https://github.com/e
106106
### Unreleased ###
107107

108108
* Fixed a swith to use the correct type for separators (thanks @RareDevil)
109+
* Added support for providing a function as zIndex value in options object (thanks @eivindga)
109110

110111
### 2.0.1 (December 3rd 2015) ###
111112

documentation/docs.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,22 @@ $.contextMenu({
184184

185185
### zIndex
186186

187-
Specifies the offset to add to the calculated zIndex of the [trigger](#trigger) element. Set to `0` to prevent zIndex manipulation
187+
Specifies the offset to add to the calculated zIndex of the [trigger](#trigger) element. Set to `0` to prevent zIndex manipulation. Can be a function that returns an int to calculate the zIndex on build.
188188

189-
`zIndex`: `int` default: `1`
189+
`zIndex`: `int`|`function` default: `1`
190190

191191
#### Example
192192
```javascript
193193
$.contextMenu({
194194
selector: 'span.context-menu',
195195
zIndex: 10
196196
});
197+
198+
$.contextMenu({
199+
selector: 'span.context-menu',
200+
zIndex: function($trigger, opt){
201+
return 120;
202+
});
197203
```
198204
199205
### className

0 commit comments

Comments
 (0)