jquery多功能弹出窗口插件PopModal.js

popModal

default params

			

$('#elem').popModal({

html : $('#content').html(),

placement : 'bottomLeft',

showCloseBut : true,

onDocumentClickClose : true,

onOkBut : function(){ },

onCancelBut : function(){ },

onLoad : function(){ },

onClose : function(){ }

});

loading ajax

			

$('#elem').popModal({

html : function(callback){

$.ajax({url : 'ajax.html'}).done(function(content){

callback(content);

});

}

});

inline bind

			

<button id="elem" data-popModalBind="#content" data-placement="bottomLeft" data-showCloseBut="true" data-overflowContent="true" data-onDocumentClickClose="true">example</button>



notifyModal

default params

			

$('#content').notifyModal({

duration : 2500,

placement : 'center',

overlay : true,

});



hintModal

default params

			

<span class="hintModal">example

<div class="hintModal_container">

Lorem Ipsum is simply dummy text of the printing and typesetting industry...

</div>

</span>



dialogModal

default params

			

$('#content').dialogModal({

onOkBut : function(){ },

onCancelBut : function(){ },

onLoad : function(){ },

onClose : function(){ },

});

inline bind

			

<button data-dialogModalBind="#content">example</button>



titleModal

default params

			

<button title="Title" data-titleModal="init" data-placement="bottom">Example</button>

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

来源:大头网

转载请注明出处,此代码仅供学习交流,请勿用于商业用途。