• Resolved xcflyer

    (@xcflyer)


    Hi,

    The problem:-
    When using sticky on a mobile and the user rotates the device, the screen size changes but the sticky still uses the original screen size.

    The solution (that works for me):-
    I modified sticky-menu-or-anything-on-scroll/assets/js/jq-sticky-anything.js

          // WIDTH/HEIGHT OF STICKY ELEMENT
          // The original element though, needs to have the inner width and height $
          // No padding, no borders, because that will be applied later anyway, reg$
    //      widthSticky = $(".sticky-element-original").css("width");
    //      if (widthSticky == "0px") {
    //        widthSticky = $(".sticky-element-original")[0].getBoundingClientRect()
    //          .width;
    //      }
          widthSticky = viewport;
    

    And set the plugin to debug mode. ??

    I should minifiy and turn debug off, but I can wait for the official release.

    You can see it working here: wildinstyle.co.uk

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mobile browser portrait/landscape’ is closed to new replies.