https://github.com/jsoon/bootstrap-popup
A enhanced window popup widget based on twitter bootstrap modal.
https://github.com/jsoon/bootstrap-popup
Last synced: 3 months ago
JSON representation
A enhanced window popup widget based on twitter bootstrap modal.
- Host: GitHub
- URL: https://github.com/jsoon/bootstrap-popup
- Owner: JSoon
- License: mit
- Created: 2016-03-07T05:07:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-22T02:42:19.000Z (almost 10 years ago)
- Last Synced: 2024-12-30T00:48:33.450Z (over 1 year ago)
- Language: HTML
- Size: 102 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bootstrap-popup
A enhanced window popup widget based on twitter bootstrap modal.
------
##Usage
First of all, you should import bootstrap-popup, which is dependent on jquery and bootstrap.js:
```html
```
### Toast
![此处输入图片的描述][1]
> $.bs.popup.toast(opts, callback);
```javascript
$.bs.popup.toast({
title: 'Title',
info: 'This is a toast.'
}, function(dialogE) {
// todos here
});
```
### Confirm
![此处输入图片的描述][2]
> $.bs.popup.confirm(opts, callback);
```javascript
$.bs.popup.confirm({
title: 'Title',
info: 'Do you want to confirm?'
}, function(dialogE) {
// todos here
});
```
### Prompt
![此处输入图片的描述][3]
> $.bs.popup.prompt(opts, callback);
```javascript
$.bs.popup.prompt({
title: 'Title',
info: 'Input your name, please.'
}, function(dialogE, message) {
// todos here
});
```
### Custom
![此处输入图片的描述][4]
> $.bs.popup.custom(opts, callback);
```javascript
$.bs.popup.custom({
title: 'Title',
dom: '
This is a custom DOM.
',
width: '200px'
}, function(dialogE) {
// todos here
});
```
## Documents
For more usage, please check bootstrap-popup.html.
[1]: https://raw.githubusercontent.com/JSoon/bootstrap-popup/master/pics/1_toast.png
[2]: https://raw.githubusercontent.com/JSoon/bootstrap-popup/master/pics/2_confirm.png
[3]: https://raw.githubusercontent.com/JSoon/bootstrap-popup/master/pics/3_prompt.png
[4]: https://raw.githubusercontent.com/JSoon/bootstrap-popup/master/pics/4_custom.png