popModal是一个jQuery显示提示工具,标题、模态对话框插件。
这个库包含5部分:
popModal——弹出窗口,显示在父元素。通过点击一个元素调用
notifyModal通知弹出,显示在所有元素。调用事件,一段时间后隐藏
hintModal,工具提示显示在父元素。上调用鼠标悬停于一个元素,元素失去焦点后隐藏
dialogModal -模态对话框,显示在所有元素。通过点击一个元素调用
titleModal工具提示,显示附近
Examples
popModal
$(el).popModal({
html : $(content).html(),
placement : 'bottomLeft',
showCloseBut : true,
overflowContent : true,
onOkBut : function(){},
onCancelBut : function(){},
onLoad : function(){},
onClose : function(){}
});
$(el).popModal({
html : function(callback) {
$.ajax({url:'ajax.html'}).done(function(content){
callback(content);
});
}
});
notifyModal
$(content).notifyModal({
duration : 2500,
placement : 'center',
overlay : true
});
hintModal
<div class="hintModal">
hover on me
<div class="hintModal_container">
text for hintModal
</div>
</div>
dialogModal
$(content).dialogModal({});
titleModal
<div title="Title text" data-titleModal="init" data-placement="top">Text</div>