-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjquery.frankieModalBox.min.js
More file actions
12 lines (11 loc) · 1.5 KB
/
jquery.frankieModalBox.min.js
File metadata and controls
12 lines (11 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
/**
* @package : Super Simple Modal Box
* @description : A very simple modal/light box jquery plugin for your beautiful projects. Improve your website and visuality.
* @author : Kamer DINC - http://kamerdinc.com
* @copyright : licensed under the MIT and GPL
* @version : 1.0
* @source : http://kamerdinc.com/frankiemodalbox
* @notes : will be updated.
* @alias : Frankie
*/
(function(e){e.fn.extend({frankieModal:function(t){function i(t){e("#__frankie_overlay").fadeOut(200);e(t).css({display:"none"})}var n={closeButton:null};var r=e('<div id="__frankie_overlay"></div>');r.css({position:"fixed","z-index":100,top:"0px",left:"0px",height:"100%",width:"100%",background:"#000",display:"none",background:"rgba(0,0,0,0.65)","box-shadow":"inset 0 0 200px 50px rgba(0,0,0,.5)","-moz-box-shadow":"inset 0 0 200px 50px rgba(0,0,0,.5)","-webkit-box-shadow":"inset 0 0 200px 50px rgba(0,0,0,.5)",filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8c000000',endColorstr='#8c000000')"});e("body").append(r);t=e.extend(n,t);return this.each(function(){var n=t;e(this).click(function(t){var r=e(this).attr("href");e("#__frankie_overlay").click(function(){i(r)});e(n.closeButton).click(function(){i(r)});var s=e(r).outerHeight();var u=e(r).outerWidth();e("#__frankie_overlay").fadeIn("fast");e(r).css({display:"block",position:"fixed",opacity:0,"z-index":99999,left:50+"%","margin-left":-(u/2)+"px",top:50+"%","margin-top":-(s/2)+"px"});e(r).fadeTo(200,1);t.preventDefault()})})}})})(jQuery)