• Hi!

    I want to set mobile breakpoint in rem.

    So menu will work correctly on mobile. This setting goes to this part of your code

    Here we lose rem units. And this value “66” goes to maxmegamenu.js where plugin determines whether we in desktop or mobile view.

    Because it comparing 66rem (though it doesn’t know it’s rem, it assumes it px) with width value of windows in pixels it gets it all wrong and plugin thinks we in mobile mode!

    You have to pass units to data-breakpont and convert this value to px before you proceed your standart logic of isDesktopView function. So plugins won’t break when I want my mobile breakpoint in rem or em.

    • This topic was modified 11 months, 1 week ago by JayFry.
    • This topic was modified 11 months, 1 week ago by JayFry.
Viewing 1 replies (of 1 total)
  • Plugin Support megatom

    (@megatom)

    Hi Jay,

    Thanks for the suggestion, I’ll take a look to see if I can find a reliable way to convert the screen with to rem in JS, and if so add that option into a future version.

    Regards,
    Tom

Viewing 1 replies (of 1 total)

The topic ‘Mobile breakpoint don’t respect units’ is closed to new replies.