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

How to use 'imgSelector' or 'selector' #290

Closed JQOz closed 4 years ago

JQOz commented 6 years ago

Hi,

i try to use the Js-code in my wp-theme(not the plugin).

if i crate a gallery like below it wokrs:

<div id="mygallery">            
         <a href="#" ><img width="174" height="300" src="..." ></a>
         <a href="#" ><img width="174" height="300" src="..." ></a>
        <a href="#" ><img width="174" height="300" src="..." ></a>
</div>

But the default wp-gallery has different structure like below.

<div id="mygallery">            
        <figure class="#">
                <div class="#">
                        <a href="#" 
                                <img width="174" height="300" src="..." >
                        </a>
                </div>
        </figure>
        <figure class="#">
                <div class="#">
                        <a href="#" 
                                <img width="174" height="300" src="..." >
                        </a>
                </div>
        </figure>
        <figure class="#">
                <div class="#">
                        <a href="#" 
                                <img width="174" height="300" src="..." >
                        </a>
                </div>
        </figure>
</div>

It doesn't work with default wp-gallery. I think i should use 'imgSelector' or 'selector'

which one do i need and how should it look like for the default wordpress gallery structure above?

Thanks, Ragards J

jerryc127 commented 4 years ago

do you know how to use 'imgSelector' or 'selector' now?