JQuery PopupBox v0.18 / 12-25-2014
Lightweight plugin for making hidden elements to popup in the center of the screen.
Breno Dadalto Silva (brenosilver) licensed under the MIT and GPL licenses.
Fiddle: http://jsfiddle.net/brenosilver/d6nvd9vr/
<script src="jquery.popupBox.js"></script>
<a href="">This is the trigger element</a>
<div id="contact">This is the box element</div>
#contact {
display:none;
}
ex: $('a').popupBox($('#contact'), {cover: true, effect: 'fadeToggle', duration: 600})
/** Styling **/
coverStyle: { color | opacity | zIndex }
boxStyle: { left | right | bottom | top | position | zIndex }
ex: $('a').popupBox($('#contact'), { cover: true, coverStyle:{color: 'red', opacity: 0.6} })
/** CallBacks **/
onFinish: function(){}
onHide: function(){}
ex: $('a').popupBox($('#contact'), {onHide: function(){
console.log("Hidden")}
})