ColorBox ima nekoliko ugrđenih varijacija pa možete izabrati onu koja vam se najviše dopada, primere možete pogledati na zvaničnom web sajtu. Takođe dodao bih da ColorBox odlično radi na svim browserima na kojima sam testirao, tj. na : Google Chrome 5 i 6, FireFox 3, Internet Explorer 6, 7, 8 i 9, Opera 10 i Safari 4 svi na Windows 7.
[code language=”html”]<link href=’http://files.oopsea.com/todor/css/colorbox.css’ media=’screen’ rel=’stylesheet’ type=’text/css’/>
<script src=’http://files.oopsea.com/todor/js/jquery.colorbox.js’ type=’text/javascript’/>
<script src=’http://files.oopsea.com/todor/js/jquery.colorbox-min.js’ type=’text/javascript’/>
<script type=’text/javascript’>
$(document).ready(function(){
//Examples of how to assign the ColorBox event to elements
$("a[rel='example1']").colorbox();
$("a[rel='example2']").colorbox({transition:"fade"});
$("a[rel='example4']").colorbox({slideshow:true});
$(".example5").colorbox();
$(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});
$(".example7").colorbox({width:"80%", height:"80%", iframe:true});
$(".example8").colorbox({width:"50%", inline:true, href:"#inline_example1"});
$(".example9").colorbox({
onOpen:function(){ alert('onOpen: colorbox is about to open'); },
onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
return false;
});
});
</script>[/code]
[code language=”html”]>http://files.oopsea.com/todor/css/colorbox.css</pre>[/code]
[code language=”html”]http://files.oopsea.com/todor/colorbox/example2/colorbox.css
http://files.oopsea.com/todor/colorbox/example3/colorbox.css
http://files.oopsea.com/todor/colorbox/example4/colorbox.css
http://files.oopsea.com/todor/colorbox/example5/colorbox.css[/code]
[code language=”html”]<a href="http://vassajt.com/slika.jpg" imageanchor="1" rel="example1" title="Zlatan Ibrahimovic u Milanu"style="margin-left: 1em; margin-right: 1em;"><img style="padding:3px;border:1px solid #dbdbdb;" alt="Zlatan Ibrahimovic u Milanu" border="0" src="http://vassajt.com/umanjenaslika.jpg" /></a>[/code]
[code language=”html”]<a href="http://lh3.ggpht.com/_2ZZRJ0rGbuU/TIPD7UyCZkI/AAAAAAAAAao/DvMSodQxTNg/s800/ibra_1706748c%5B1%5D.jpg" imageanchor="1" rel="example1" title="Zlatan Ibrahimovic u Milanu"style="margin-left: 1em; margin-right: 1em;"><img style="padding:3px;border:1px solid #dbdbdb;" alt="Zlatan Ibrahimovic u Milanu" border="0" src="http://lh3.ggpht.com/_2ZZRJ0rGbuU/TIPD7UyCZkI/AAAAAAAAAao/DvMSodQxTNg/s200/ibra_1706748c%5B1%5D.jpg" /></a>[/code]