Template:MQgallery
From 2012.igem.org
(Difference between revisions)
Line 36: | Line 36: | ||
</script> | </script> | ||
+ | <script> | ||
+ | Galleria.run('#galleria', { | ||
+ | extend: function(options) { | ||
+ | |||
+ | Galleria.log(this) // the gallery instance | ||
+ | Galleria.log(options) // the gallery options | ||
+ | |||
+ | // listen to when an image is shown | ||
+ | this.bind('image', function(e) { | ||
+ | |||
+ | Galleria.log(e) // the event object may contain custom objects, in this case the main image | ||
+ | Galleria.log(e.imageTarget) // the current image | ||
+ | |||
+ | // lets make galleria open a lightbox when clicking the main image: | ||
+ | $(e.imageTarget).click(this.proxy(function() { | ||
+ | this.openLightbox(); | ||
+ | })); | ||
+ | }); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 07:27, 13 August 2012
![](https://static.igem.org/mediawiki/2012/0/08/IMG_3622.jpg)
![](https://static.igem.org/mediawiki/2012/c/c4/PLAN1.jpg)
![](https://static.igem.org/mediawiki/2012/1/1a/Igem2.jpg)
![](https://static.igem.org/mediawiki/2012/9/92/Igem1.jpg)