BX Slider - Responsive - Min / Max Slides
<p>I am trying to change the amount of slides shown at different window widths, on inital load its pulling the right amount of slides through. but on resize the min/max slides within the slider options dont seem to be changing, even though my console logs are showing the number to be updated.</p>

<p>my code is </p>

<pre><code>        var minSlides;
        var maxSlides;
        function windowWidth() {
            if ($(window).width() &lt; 420) {
                minSlides = 1;
                maxSlides = 1;
            }
            else if ($(window).width() &lt; 768) {
                minSlides = 2;
                maxSlides = 2;
            }
            else if ($(window).width() &lt; 1200) {
                minSlides = 3;
                maxSlides = 3;
            }
            else {
                minSlides = 4;
                maxSlides = 4;
            }
        }

        windowWidth();
        var slider = $('.m-partners-slider').bxSlider({
            pager: false,
            controls: false,
            auto: true,
            slideWidth: 5000,
            startSlide: 0,
            nextText: ' ',
            prevText: ' ',
            adaptiveHeight: true,
            moveSlides: 1,
            slideMargin: 20,

            minSlides: minSlides,
            maxSlides: maxSlides,
        });

        $('.slider-prev').click(function () {
            var current = slider.getCurrentSlide();
            slider.goToPrevSlide(current) - 1;
        });
        $('.slider-next').click(function () {
            var current = slider.getCurrentSlide();
            slider.goToNextSlide(current) + 1;
        });

        $(window).on("orientationchange resize", function () {
            windowWidth();
            slider.reloadSlider();
            console.log("minSlides:" + minSlides);
            console.log("maxSlides:" + maxSlides);
        })
</code></pre>

<p>Any help would be greatly appreciated. </p>