I've read http://learn.elgg.org/en/2.2/guides/javascript.html#module-elgg-lightbox
based on the link , i must use this code to use gallery
require(['elgg/lightbox'], function(lightbox) { var options = { photo: true, width: 500 }; lightbox.bind('a[rel="my-gallery"]', options, false); // 3rd attribute ensures binding is done without proxies });
But i'm still failed to make gallery
1. I put the code on the top of page , is it wrong ?
2. this is my "rel" implementation
<a href="this image should be in the gallery" class="elgg-lightbox-photo" rel="my-gallery"><img class="elgg-photo " src="image thumbnail" alt="Chrysanthemum.jpg" /></a>
is it wrong ?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- ihayredinov@ihayredinov
ihayredinov - 0 likes
- Avicena AlGhiffar Alsharaawy@AVicenaGhifa
Avicena AlGhiffar Alsharaawy - 0 likes
- ihayredinov@ihayredinov
ihayredinov - 0 likes
- Avicena AlGhiffar Alsharaawy@AVicenaGhifa
Avicena AlGhiffar Alsharaawy - 0 likes
- Avicena AlGhiffar Alsharaawy@AVicenaGhifa
Avicena AlGhiffar Alsharaawy - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
You must log in to post replies.Look in the theme sandbox, there is a working example there.
Okay , i've opened theme_sandbox , what section i must see ? , i've opened javascripts section and there is a example of elgg-lightbox but without image-gallery ? (i use 1.12)
Why do you read 2.2 documentation if you are using 1.12? Lightbox module in 1.12 isn't very sophisticated so you can't rely on it - use colorbox and implement your own bindings.
i've tried use colorbox but failed , do you have/know a plugin (elgg 1.1x) that has gallery colorbox so i can study it?
because it's the first time i know colorbox , and my javascript skiil is still low . I just want a simple colorbox gallery with next prev
I'm succesful to make a gallery , thanks for your answer Ismayl , i try to use colorbox and i'm succesful to make gallery. Thanks :)
It's polite to mention how you do this for people who have the same problem in the future.