Skip to content

brenosilver/JQuery.PopupBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JQuery.PopupBox

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/

Usage

Include:

<script src="jquery.popupBox.js"></script>

js:

$(document).ready(function(){ $('a').popupBox($('#contact'), {cover:true}); });

Html:

<a href="">This is the trigger element</a>
<div id="contact">This is the box element</div>

css:

#contact {
	display:none;
}

Options:

cover : true | false effect : toggle | slideToggle | fadeToggle duration : 400
	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")}
  	    })

About

JQuery Plugin for Popup elements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published