javascript - Onclick Menu opening slowly -
i have jquery onclick menu works great in ie9+, chrome , firefox. in ie8 opens extremely slowly. takes approximately 10 seconds menu show, , none of animations play, menu appears.
the menu uses latest version of jquery (v1.10.2) , uses slide , animate open , close different parts of menu. have tried googling various combinations of slow jquery, slow loading menus , slow animations ie8 , jquery can, , cannot find remotely issue i'm having.
you can see problem going website here. visit ie8 , notice slow speeds when click on test category 1 or 2.
has come across kind of issue before? know causes , solution working fine?
edit
i have noticed it's not affecting menu, carousel. if @ animations not sliding either, in ie9 + slide. i'm not sure if 2 linked seems odd it's both jquery effects being affected.
edit 2
after more testing have noticed if bottom of menu falls on tabs below carousel bit on tabs shows straight away, if on tabs. same happens when close menu. hover on tabs , bit of menu drawn there goes away.
i watched , noticed menu shows , disappears when carousel changes. seem redraw issue, code i've been trying make paint upon completion doesn't seem working. code got answer here (slightly modified work jquery elements answer below).
function flushthis(id){ var msie = 'microsoft internet explorer'; var tmp = 0; //var elementonshow = document.getelementbyid(id); var elementonshow = $(id); if(navigator.appname == msie) { tmp = elementonshow.parentnode.offsettop + 'px'; } else { tmp = elementonshow.offsettop; } }
i think might case of either finding correct function redraw, or running function on correct element. run on clicked element, may not correct one. have tried running function on various elements, including main ul, element clicked, element, opened , element opened's parent. no luck of them.
jsfiddle: requested here jsfiddle of issue, me won't work in ie10. works in chrome fine.
edit 3:
i have stripped away except bare essentials , put in test file. can veiw on website here. getting no errors in ie console, nor in other console. still giving same issue, menu isn't drawn. because there no carousel behind force redraw never shows on test site.
all redraw scripts i've tried far have failed. how can working?
i don't know if related or not, noticed there's error occurs each time click on menus.
uncaught typeerror: cannot read property 'offsettop' of null
it occurs in "flushthis" function (from jquery.fluid-menu.js) apparently kind of hack support ie. if @ code, attempts read "offsettop" property of element , throws away result. perhaps trick on ie make run native code maybe repaint/relayout page once menu has been opened? looks jqueryified element ($this) being passed function instead of id of element, presume causing fail. may want try code executing , see if resolves problem.
Comments
Post a Comment