vvvmax / unitegallery

Unite Gallery - Responsive jQuery Image and Video Gallery Plugin. Aim to be the best gallery on the web on it's kind. See demo here:
http://unitegallery.net
MIT License
531 stars 157 forks source link

How to change grid from right to bottom on resize #187

Open DuudeXX8 opened 6 years ago

DuudeXX8 commented 6 years ago

Hi everyone

I need to change grid position from right to bottom in window onresize event .

How to do that?

This code didn't help :(

It work's only on load

$(window).on('resize load', function() {
    let w = window.innerWidth;

    if (w <= 992) {
        jQuery("#gallery").unitegallery({
            gallery_theme: "grid",
            theme_panel_position: "bottom"
        });
    } else if (w > 992) {
        jQuery("#gallery").unitegallery({
            gallery_theme: "grid",
            theme_panel_position: "right"
        });
    }
});