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

question: Dynamically loading images for each folder #252

Closed M4rtine closed 6 years ago

M4rtine commented 6 years ago

Hello, Do it possible to help me for dynamically loading images in folder i would like loading different gallery for each folder

TREES folders

HTML code

<div  class="mygallery gall-a"></div>
<div class="mygallery gall-b"></div>

JS code (now)

    $(".mygallery").each(function(i, el) {
        $(el).justifiedGallery({
                    rel: 'gal-' + i,
            rowHeight: 360,
            margins: 20,
            lastRow: 'justify'
        }).on('jg.complete', function() {
            $(this).find('a').colorbox({
                maxWidth : '88%',
                maxHeight : '88%',
                opacity : 0.85,
                transition : 'fade',
                current : '',
                retinaImage : true
            });
        });
    });
M4rtine commented 6 years ago

Ok, i'm using un CMS file based with no database. And with dynamic templates in TWIG, it's work very well. THANKS it's okay now.