Carousel responsive settings error in the console log

94
December 25, 2019, at 11:40 PM

i have some jcarousel in my page with same responsive setting and all other settings are the same, but for one of them i get console error but it works fine for other carousels :

Invalid slick slider responsive breakpoints setting value!

        var responsiveBreakpointsObj = {};
        var carouselHtmlElementId = "@carousel.Settings.CarouselHtmlElementId";
        var jCarousel = $("#" + carouselHtmlElementId + " .slick-carousel"); // Each carousel has different id
 try {
       responsiveBreakpointsObj = JSON.parse('[{"breakpoint":1680,"settings":{"slidesToShow":7}},{"breakpoint":1420,"settings":{"slidesToShow":6}},{"breakpoint":1200,"settings":{"slidesToShow":5}},{"breakpoint":869,"settings":{"slidesToShow":4}},{"breakpoint":616,"settings":{"slidesToShow":3}},{"breakpoint":443,"settings":{"slidesToShow":2}}]');
     }
 catch (e) {
             console.log('Invalid slick slider responsive breakpoints setting value!');
           }
jCarousel.slick({      // calling carousel slick
                infinite: true,
                slidesToShow: 8,
                slidesToScroll: 1,
                autoplay: false,
                appendArrows: '.carousel-title',
                cssEase: 'linear',
                respondTo: 'slider',
                edgeFriction: 0.05,
                initialSlide: 0,
                pauseOnHover: true,
                draggable: false,
                responsive: responsiveBreakpointsObj
            });

It's a bit strange if this responsiveBreakpointsObj has any issue why i get only one error in the console log for that specific carousel?

My second question is if this breakpoints setting is invalid why it works fine on every responsive break points?!

Any suggest would be appreciated. :)

Rent Charter Buses Company
READ ALSO
How do I dynamically load data from my django views to my django template with jquery without refreshing the page?

How do I dynamically load data from my django views to my django template with jquery without refreshing the page?

I'm trying to load data from my django views into my django templates without refreshing the page with jqueryI have a cart function in my views that's returning all the items in a users cart

120
jQuery with AJAX to store cookie not working

jQuery with AJAX to store cookie not working

I'm trying to store a cookie, containing user's zip code, when the user logs inFor the PHP login, it works fine, using "wp_login" action hook

130
Jquery datatable does not recognize HTML changes

Jquery datatable does not recognize HTML changes

I am adding a some data to a column in my Jquery datatable based on on input eventThe datatable column is being populated but I am populating it using Jquery doing:

140
Merging 2 filter functions with one If Else statement

Merging 2 filter functions with one If Else statement

I tried number of different combinations put 2 hours of attempts got me nowhereHow can I merge the 2 filter functions in one if

103