question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Editing Row amounts for responsive

See original GitHub issue

I have been using slick slider a lot and I love it! I am having an issue with the rows for my responsive settings. I want two rows for desktop which then goes to one row for a smaller screen, the responsive settings recognizes the changes to slide amounts but not rows. The code I have used is below, can you tell me where I am going wrong:

            $('.ptype-slick').slick({
                infinite: true,
                arrows: false,
                rows: 1,
                slidesToShow: 1,
                mobileFirst: true,
                responsive: [
                    {
                        breakpoint: 360,
                        settings: {
                            slidesToShow: 2,
                        }
                    },
                    {
                        breakpoint: 450,
                        settings: {
                            slidesToShow: 3,
                        }
                    },
                    {
                        breakpoint: 600,
                        settings: {
                            slidesToShow: 4,
                        }
                    },
                    {
                        breakpoint: 700,
                        settings: {
                             rows: 2,
                            slidesPerRow: 5,
            }
        }
                ]
            });

Many thanks in advcance! Fiona

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:28 (5 by maintainers)

github_iconTop GitHub Comments

16reactions
pocholcommented, Aug 24, 2016

I found some core fix. Works for me.

http://stackoverflow.com/questions/35702923/slick-show-2-row-6-items-on-desktop-and-1-row-1-item-on-mobile

So, find these two methods in slick.js:

Slick.prototype.buildRows = function() { … } Slick.prototype.cleanUpRows = function() { … } and change the if condition from if(.options.rows > 1) to if(.options.rows > 0)

4reactions
arvinsimcommented, Jan 11, 2017

I have the same problem right now but it seems that the PR fix isn’t still merged yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Editing Responsive Layouts - MadCap Flare's Online Help
Select Home > Responsive Layout. The Responsive Layout window pane opens. In the Manage section, the style being used by the current responsive...
Read more >
New Feature: Responsive Row Layout - Visual Composer
Choose the row you want to customize;; Hover the row section and click on Row Layout option;; Set Custom responsiveness settings toggle ON....
Read more >
Responsive Editing Mode - Beaver Builder Knowledge Base
Click the responsive settings icon next to settings that have it for a row, column, or module. Your page view will stay in...
Read more >
grid-template-rows - CSS: Cascading Style Sheets | MDN
Values · <length>. Is a non-negative length. · <percentage>. Is a non-negative <percentage> value, relative to the block size of the grid ...
Read more >
Responsive web design basics
In a responsive design, you can use Flexbox to display items as a single row, or wrapped onto multiple rows as the available...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found