Team:Marburg/Template:Header
From 2013.igem.org
(Difference between revisions)
m |
m |
||
Line 26: | Line 26: | ||
<script type="text/javascript" src="2013.igem.org/Team:Marburg/Template:Easing.js?action=raw"></script> | <script type="text/javascript" src="2013.igem.org/Team:Marburg/Template:Easing.js?action=raw"></script> | ||
<script type="text/javascript" src="https://2013.igem.org/Team:Marburg/Template:Colorbox.js?action=raw"></script> | <script type="text/javascript" src="https://2013.igem.org/Team:Marburg/Template:Colorbox.js?action=raw"></script> | ||
- | |||
+ | <script type="text/javascript"> | ||
$.fn.cycle.defaults.timeout = 6500; | $.fn.cycle.defaults.timeout = 6500; | ||
$(function() { | $(function() { | ||
Line 45: | Line 45: | ||
.append('<h3>' + this.alt + '</h3>'); | .append('<h3>' + this.alt + '</h3>'); | ||
} | } | ||
+ | |||
+ | $(document).ready(function(){ | ||
+ | //Examples of how to assign the Colorbox event to elements | ||
+ | $(".colorbox").colorbox({rel:'colorbox'}); | ||
+ | $(".callbacks").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'); } | ||
+ | }); | ||
+ | |||
+ | $('.non-retina').colorbox({rel:'group5', transition:'none'}) | ||
+ | $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true}); | ||
+ | |||
+ | //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></html> | </script></html> |
Revision as of 06:40, 4 October 2013