miromannino / Justified-Gallery

Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.
http://miromannino.github.io/Justified-Gallery/
MIT License
1.68k stars 299 forks source link

automatically initialize justified gallery based on html attribute #255

Closed crisc2000 closed 6 years ago

crisc2000 commented 6 years ago

hello. it's possible to automatically initialize justified gallery without using this kind $("#basicExample").justifiedGallery(); of additional javascript? i don't seem to find nothing related to this in the docs.

they are other js libraries ex. lightbox2, fancybox3 that have auto-start. it will be nice if Justified-Gallery to auto-start without additional javascript code if some specific html attribute is present in the wrapper element. for example<div class="justified-gallery" data-jg>...</div> you can use a certain class or data-...

miromannino commented 6 years ago

I don't like this approach. Is attractive for very beginners but this is not a library for very beginners. I would say any intermediate can deal with the usual jQuery call. Otherwise I am doing soon some plugins for react and Angular.

Thank you for the idea anyway