0
votes

I'm having issues on how to disable Bxslider on mobile devices especially on 768px screen going downwards. I have been looking for answers but I can't find any. This is my jQuery code

jQuery(document).ready(function(){
  jQuery('.bxslider').bxSlider({
    mode: 'fade',
    auto: true,
    speed: 2000,
    nextText: '<span></span>',
    prevText: '<span></span>'
  });
});
1
if ($(window).width() >= 768) initialize slider - Morpheus

1 Answers

0
votes

You can do it a few ways but the best would have to be using a simple jQuery function where you grab the users screen dimensions and if it is smaller then 768px then hide it else show the div/span

$(document).ready(function () {

    if ($(window).width()) <= 768px) {
        $(".hideDiv").hide();
    }
    else {

        $(".showDiv").show();
    }

});