https://github.com/future-team/jq-modal
jquery 模态框
https://github.com/future-team/jq-modal
Last synced: 3 months ago
JSON representation
jquery 模态框
- Host: GitHub
- URL: https://github.com/future-team/jq-modal
- Owner: future-team
- License: mit
- Created: 2016-06-02T08:44:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-02-17T08:00:28.000Z (over 9 years ago)
- Last Synced: 2025-02-19T17:46:48.789Z (over 1 year ago)
- Language: JavaScript
- Size: 85 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# jq-modal
模态框(jquery插件)
## 使用
* 模拟系统弹框
```js
import {alert,confirm} from 'jq-modal';
alert('test');
confirm('Sure you want to exit?',{
successCallback:function(){
console.dir('successCallback');
},
cancelCallback:function(){
console.dir('cancelCallback');
}
});
```
* 自定义弹框
```html
自定义标题
自定义内容
```
```js
import {mask} 'jq-modal';
//jquery plugs
$('#dialog-test').mask({
closeCallback:()=>{
console.dir('关闭2');
}
});
//or
mask($('#dialog-test'),{
closeCallback:()=>{
console.dir('关闭2');
}
});
```
## 示例查看
下载源码至本地后执行
```js
npm install
npm run demo
```