https://github.com/lovemo/smkpopdialog
a awesome coustom js pop dialog;自适应屏幕通用活动弹框
https://github.com/lovemo/smkpopdialog
alert dialog html5 jquery-plugin jquery-ui pop popup-window tip
Last synced: 2 months ago
JSON representation
a awesome coustom js pop dialog;自适应屏幕通用活动弹框
- Host: GitHub
- URL: https://github.com/lovemo/smkpopdialog
- Owner: lovemo
- License: mit
- Created: 2018-09-12T09:49:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-12T10:30:43.000Z (about 7 years ago)
- Last Synced: 2025-05-18T13:49:55.527Z (5 months ago)
- Topics: alert, dialog, html5, jquery-plugin, jquery-ui, pop, popup-window, tip
- Language: JavaScript
- Homepage:
- Size: 229 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SMKPopDialog
a awesome coustom js pop dialog---

### usage
```js
/**
* 初始化
* options.bgColor 背景色
* options.width 宽度
* options.height 高度
* options.bgImage 背景图片
* options.bgClick 背景点击
* options.msg.text 弹框文字
* options.msg.fontSize 弹框文字大小
* options.msg.color 弹框文字颜色
* options.close.width 关闭宽度
* options.close.height 关闭高度
* options.close.image 关闭图片
* options.close.offset 关闭位置 lt:左上 lb:左下 rt:右上 rb:右下 tc:上中 bc:底中 l+/-x,t+/-x偏移位置
*/
var pop = SMKPopDialog.init({
bgImage: './images/share.png',
bgClick: function() {
console.log('bg click ...')
},
msg: {
text : '标题标题标题标题标题标题',
offest : 60,
fontSize: 15,
color: 'red'
},
container: {
html: '确定' +
'取消'
},
close: {
offset: 'b-100,c',
image: './images/close.png',
width: 50,
callback: function() {
console.log('close ...')
}
}
})$('button').click(function() {
pop.show()
})$('.pop-dialog-bottom-button—left').click(function() {
console.log('click left button')
})$('.pop-dialog-bottom-button—right').click(function() {
console.log('click right button')
})
```