JQuery animation flicker on iPad

When using the mmenu with a fixed position header on iPad, and the screen has been scrolled down a bit, the screen has an annoying flicker when expanding and closing the menu.


Well From what I understood. It's a problem from the recalculation of sizes and positioning of the elements.

I suggest you to put your #menu as position:absolute instead of position:static.

So, when you change your menu position css, from absolute to fixed, the browser will not need to recalculate the position and sizes of other elements,because the both position (absolute and fixed) are flying over the other elements, don't affecting then "phisically"

another comment:

Okay, seems the problem was two-folded:

I pointed to instead to the href, which I also dynamically change on scroll
Did not 'release' the event
It now works smoothly, with no flickering, like this:

$("#menubar").on("click", "#menu a[href='#top']", function(){
    $('body,html').animate({ scrollTop: 0 }, 'slow');
    return false;





#juncotodo - #jquery - #menu

From JR's : articles
162 words - 1439 chars
created on
updated on - #
source - versions

A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: May 21, 2022 - 9:02 p.m. EDT