https://github.com/onface/zindex.js
To obtain the biggest zindex(dialog,tooltip,select menu need this)
https://github.com/onface/zindex.js
Last synced: 10 days ago
JSON representation
To obtain the biggest zindex(dialog,tooltip,select menu need this)
- Host: GitHub
- URL: https://github.com/onface/zindex.js
- Owner: onface
- Created: 2017-02-12T13:01:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-13T01:34:46.000Z (over 8 years ago)
- Last Synced: 2024-04-13T17:13:41.555Z (about 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zindex.js
> To obtain the biggest zindex(dialog,tooltip,select menu need this)
```shell
npm install zindex.js --save
``````js
var zIndex = require('zindex.js')
// zIndex(type) type: dialog-mask dialog popup tooltipzIndex() // 1
zIndex() // 2
zIndex() // 3
zIndex('dialog-mask') // 1051
zIndex('dialog-mask') // 1052
zIndex('dialog-mask') // 1053
zIndex('dialog') // 1151
zIndex('dialog') // 1152
zIndex('dialog') // 1153
// popup: select menu, input autocomple, full screen loading
zIndex('popup') // 1251
zIndex('popup') // 1252
zIndex('tooltip') // 1351
zIndex('tooltip') // 1352
``````js
Dialog.prototype.show = function () {
this.dom.mask.style.zIndex = zIndex('dialog-mask') // 1051 , 1052 , 1053
this.dom.wrap.style.zIndex = zIndex('dialog') // 1151 , 1152, 1153
}
Tooltip.prototype.show = function () {
this.dom.wrap.style.zIndex = zIndex('tooltip') // 1351, 1352, 1353
}
```