0

I have implemented a JSSOR slider into my responsive redesign on my website. You can view it here.

At first, I had an issue with the slider responding to an orientation change on iPhones and iPads. Through a little research I found that I had to add a orientationchange command to fix it.

After I got that working I tried doing orientation changes on a Windows phone and an Android phone. The re-sizing does not work on either of these devices.

I thought that the resize command was supposed to take care of it.

The code that I think is the issue is this:

ScaleSlider();

        if (!navigator.userAgent.match(/(iPhone|iPod|iPad|BlackBerry|IEMobile|Android)/)) {
            $(window).bind('resize', ScaleSlider);
        }
        else {
          $(window).bind("orientationchange", ScaleSlider);
        }

1 Answers1

0

What about the following event handling code?

    if (!navigator.userAgent.match(/(iPhone|iPod|iPad|BlackBerry|IEMobile|Android)/)) {
        $(window).bind('resize', ScaleSlider);
    }

    $(window).bind("orientationchange", ScaleSlider);

Please also place following code in head tag,

<meta name="viewport" content="width=device-width, initial-scale=1">
jssor
  • 6,995
  • 2
  • 18
  • 21