cooking, programming and everyday life xrado

Thursday, January 10, 2008

imgBox ...like my lighter lightbox

You all probably know lightbox image popup,.. ok ..this is my simple version of it, using mootools 1.2.

DEMO

Features:
- gallery functions (next, previous image)
- direct link to certain image popup
- image description via title
- no extra css or images needed, except progress bar (optional)
- aware of linux flash non transparency
- fully custom able
- no effects ..not really a feature..but i like it this way

tested & working : firefox, opera, internet explorer, safari, konqueror

Default options

options:{
	classname: 'imgbox',
	overlay_bg: '#000000',
	overlay_opacity: '0.6',
	rbox_bg: '#ffffff',
	controls_color: 'red',
	numberof_color: '#333333',
	title_color: '#ffffff',
	thumb_url: 'size=thumb',
	image_url: 'size=large',
	progressbar: '',
	margin_top: '20px'
},

Usage
1. Include imgbox.js and mootools.js (DomReady, Selectors, Element.Dimensions, Element.Styles and deps) to header
<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="js/imgbox.js"></script>
2. Add class 'imgbox' (or the one you want) to images you want to popup
<img src="small_image.jpg" class="imgbox" title="image description">
3.Add this line some where on your page (within script tags) or add it directly to imgbox.js
window.addEvent('domready', function(){ new imgBox({}); });

Example with options
window.addEvent('domready', function(){  
	new imgBox({		
		thumb_url: 'small_',
		image_url: 'big_'
	});
});
thumb_url and image_url set the differences in thumbnail and popup image path that will be switched/replaced. For example if you have thumbnail image with name small_12.jpg, the popup will show big_12.jpg.

I hope you like the script. Feel free to use it on your site. If you have an idea how to improve it, let me know.

Download:
imgbox.js
http://www.uggbootsoutlet.com.co
http://www.ralphlaurenoutletonlinepolo.us.com
http://www.ralph-laurenoutlet.me.uk
http://www.uggsale.us.com
http://www.uggoutlet.net.co
http://www.adidasshoesoutlets.us.com
http://www.birkenstocks.us
http://www.nikeshoes.in.net
http://www.cheapjordans.com.co
http://www.moncleroutlets.us.org
http://www.yeezyboost.us.com
http://www.ugg-slippers.us.com
http://www.cheapraybansunglassesofficial.us.com
http://www.coachoutlets.in.net
http://www.ralphlaurenoutletonlines.us.com
http://www.cheapuggssale.com.co
http://www.nikeoutletonline.us.com
http://www.ralph-laurenoutlet.com.co
http://www.beatsbydrdre.org.uk
http://www.uggs-australia.it
http://www.coach-outletonline.us.org
http://www.hermes-handbags.us
http://www.nikeshoes.us.com
http://www.ralph-laurenuk.co.uk
http://www.adidas-yeezyshoes.us.com
http://www.adidasnmd.us.org
http://www.coachoutletsonlines.us.com
http://www.coachfactoryoutletsonlines.us.com
http://www.goosecanadaoutlet.us.com
http://www.nikehuaracheshoes.in.net
http://www.katespade.in.net
http://www.burberry-outlet-canada.ca
http://www.catboots.us
http://www.burberryoutletsale.com.co
http://www.canadagoose-outlet.name
http://www.pandoracharmsuk.uk
http://www.moncleroutlet.in.net
http://www.hermesbirkin.in.net
http://www.coach-factoryoutletonline.us.org
http://www.cheap-uggsboots.us.com
http://www.redbottomsshoes.us.com
http://www.pandora.us.com
http://www.coachhandbagsoutlet.us.com
http://www.supremeuk.org.uk
http://www.michael-korsoutlet.ca">http://www.michael-korsoutlet.ca
http://www.pandoracharmssaleclearance.me.uk
http://www.ralphlaurenoutlet.us.org
http://www.uggs.net.co
http://www.tomsshoes.us.com
http://www.pandoracharms.us.com
http://www.michaelkorsoutletonlineclearance.in.net">http://www.michaelkorsoutletonlineclearance.in.net
http://www.air-jordans.us.com
http://www.kate-spade.us.com
http://www.katespadeoutletonline.us.com
http://www.coachoutletus.us.com
http://www.cheapjordanshoes.us.com
http://www.jordanretro.name
http://www.uggsbootscanada.ca
http://www.nfljerseyscheapwholesale.us.com
http://www.louboutinshoes.in.net
http://www.coachoutlets.us.org
http://canadagoose.jacketsoutlet.us.com
http://www.tomsoutletstore.in.net
http://www.valentinoshoesoutlets.us.com
http://www.cheapuggs.in.net
http://www.christianlouboutinshoes.us.org
http://www.pandora-charms.us.org
http://www.mlbjerseys-cheap.us.com
http://www.pandora-uk.me.uk
http://www.longchamphandbags.me.uk
http://www.mbtshoes.us.org
http://www.red-bottoms.us.com
http://www.michaelkors-handbags.us.org">http://www.michaelkors-handbags.us.org
http://www.moncler-outlet.us.com
http://www.michaelkorsoutletclearance.in.net">http://www.michaelkorsoutletclearance.in.net
http://www.officialcoachoutlet.us.com
http://www.cheapnfl-jerseyswholesale.us.com
http://www.canadagooseoutlet.cc
http://www.coachoutletstoreonlineclearances.in.net
http://www.coachoutletstoreonline.com.co
http://www.nikeairmax.in.net
http://www.yeezyboost-350.co.uk
http://www.louisvuittonoutlet.us.org
http://www.katespadehandbag.us.com
http://www.coachoutlet.in.net
http://www.oakleysunglassses-cheap.us.com
http://www.uggs-outlet.net.co
http://www.michaelkorsoutlet.co.uk">http://www.michaelkorsoutlet.co.uk
http://www.canadagoose-outlet.net.co
http://www.adidasnmd-shoes.us
http://www.ugg-boots.net.co
http://www.raybansunglassessales.us.com
http://www.doudounemonclerpascher.fr
http://www.coachcanadaoutlet.ca
http://www.coachoutletonlinecoachfactoryoutlet.us.com
http://www.ralphlaurensaleclearance.org.uk
http://www.cheap-uggboots.net.co
http://www.uggsaustralia.fr
http://www.cheapraybans.com.co
http://www.ugg-outlet.com.co
http://www.coachoutletcoachfactoryoutletonline.us.com
http://www.canadagooseoutlet.net.co
http://www.christianlouboutinsale.us.org
http://www.oakley.nom.co
http://www.michaelkorshandbags-outlet.us.org">http://www.michaelkorshandbags-outlet.us.org
http://www.coachfactory-outletstore.us.com
http://www.uggsoutlets.com.co
http://www.yeezyboost-350.us.com
http://www.uggsandals.in.net
http://www.birkenstockshoes.us.com
http://www.pandoracharms.name
http://www.guccioutlets.us.org
http://www.birkenstockoutletstore.us.com
http://www.michael-kors-outletonline.us.com">http://www.michael-kors-outletonline.us.com
http://www.cheapjordan-shoes.in.net
http://www.uggsoutlets.in.net
http://www.harden-vol1.com
http://www.jameshardenshoes.us.com
http://www.uggs-outlets.in.net
http://www.pandora-jewelryoutlet.us.com
http://www.ralphlaurenuk.me.uk
http://www.cheapuggboots.com.co
http://www.ultraboost.us
http://www.coach-outlets.us.com
http://www.michaelkors-mkoutlet.in.net">http://www.michaelkors-mkoutlet.in.net
http://www.michaelkorsoutlets.us.com">http://www.michaelkorsoutlets.us.com
http://www.monclerjacketsoutlet.in.net
http://ugg.bootsoutlet.us.com
http://www.adidasyeezyshoes.us.com
http://www.timberland-outlets.us
http://www.pandora-outlet.us.com
http://www.nike-store.us.com
http://www.coach-outlet.in.net
http://www.adidas-nmd.us.com
http://www.adidasnmd.org.uk
http://www.ugg.in.net
http://www.toryburchoutletonline.com.co
http://www.adidas-outlet.us.com
http://www.michaelkorsoutletstoreonline.us.org">http://www.michaelkorsoutletstoreonline.us.org
http://www.cheapmlbjerseys.us
http://www.polo-ralphlauren.in.net
http://www.burberrysale.org.uk
http://www.northfaceoutlet.us.com
http://www.superdryuk.org.uk
http://www.coach-factoryoutlet-online.us.com
http://www.michae

What do you think?
name from url
   can't read the code? (reload)