Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I put breakpoint based on specific <div> width rather than complete page? #258

Open
nocodetalks opened this issue Aug 26, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@nocodetalks
Copy link

new Glider(reviewList, {
      slidesToShow: 1,
      slidesToScroll: 1,
      draggable: true,
      dots: ".dots",
      arrows: {
        prev: ".glider-prev",
        next: ".glider-next",
      },
      responsive: [
        {
          // screens greater than >= 768px
          breakpoint: 768,
          settings: {
            // Set to `auto` and provide item width to adjust to viewport
            slidesToShow: 2,
            slidesToScroll: 1,
            duration: 0.25,
          },
        },
        {
          // screens greater than >= 992px
          breakpoint: 992,
          settings: {
            slidesToShow: 3,
            slidesToScroll: 1,
            duration: 0.25,
          },
        },
        {
          // screens greater than >= 1200px
          breakpoint: 1200,
          settings: {
            slidesToShow: 4,
            slidesToScroll: 1,
            duration: 0.25,
          },
        },
      ],
    });

Right now its working on the current page width.

How can I specify that the breakpoint works on the width of the specified div, rather than the whole page?

@NickPiscitelli
Copy link
Owner

No, unfortunately this is not possible. You could patch it in rather easily though

@NickPiscitelli NickPiscitelli added the enhancement New feature or request label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants