D
D
drtvader2015-11-02 13:46:11
JavaScript
drtvader, 2015-11-02 13:46:11

How do I enable horizontal scrolling at 1024 resolution?

For bxslider I found such a script, it is necessary that at a resolution of 1024 or less, horizontal scrolling is enabled. If I prescribe manually, then vertical scrolling is also cut off.

$(document).ready(function(){
  sliderResize();
});

$(window).resize(function(){
  sliderResize();
});

function sliderResize() {
  var slider = $('.bxslider').bxSlider({
        mode: 'vertical',
        minSlides: 3,
        maxSlides: 10,
        slideWidth: 100,
        slideMargin: 5,
    });

  if ($(window).width()==1920 && $(window).width()>=1281) {
    slider.reloadSlider({
      minSlides: 4,
      maxSlides: 10,
    });
  } else if ($(window).width()<=1280) {
    slider.reloadSlider({
      minSlides: 3,
      maxSlides: 10,
    });
  };
}
function sliderResize() {
  var slider = $('.bxslider').bxSlider({
        mode: 'vertical',
        minSlides: 3,
        maxSlides: 10,
        slideWidth: 100,
        slideMargin: 5,
    });

  if ($(window).width()==1024 && $(window).width()>=481) {
    slider.reloadSlider({
      minSlides: 4,
      maxSlides: 10,
    });
  } else if ($(window).width()<=480) {
    slider.reloadSlider({
      minSlides: 3,
      maxSlides: 10,
    });
  };
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
inDeepCode, 2015-11-02
@inDeepCode

In CSS:

@media (max-width:  1024px){
body { overflow-x: show; }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question