Problem with responsive menu

More
10 years 5 months ago #43997 by devokue
Doesn't work either.

I don't know if this helps or has something to do with it:
when I open the site on my desktop-computer on a big screen, and I scale the browser window down (narrower than abot 980px in width), the regular menu turns into the drop-down-menu. Now, when I go to a different page on that site, the drop-down-menu turns back into the regular menu – what should not happen as the browser window is still scaled down.

Please Log in to join the conversation.

More
10 years 5 months ago #44001 by ivan.milic
Try:

jQuery(window).load(function(){
menutransform();
setTimeout(function(){
menutransform();
},300);
});


also in that same file:

if(topMenuWidth > topMenuContainerWidth) {

you can try to replace this with:

if(jQuery(window).width() < 768) {

change 768 to needs

Please Log in to join the conversation.

More
10 years 5 months ago #44017 by devokue
Now this looks much better. We're almost there.

There is only one strange thing happening: when loading the page I see 3 dropdown menus:





Now, when I scroll down and then up again I see only one:




I tested this on an iPhone 5s… But I can see the same on a desktop browser like firefox in a narrow window…
Attachments:

Please Log in to join the conversation.

More
10 years 5 months ago #44024 by ivan.milic
Change this line:

if(jQuery(window).width() < 768) {

like this:

if(jQuery(window).width() < 768 && !(jQuery(".tinynav:visible")[0])) {

Please Log in to join the conversation.

More
10 years 5 months ago #44025 by devokue
We are getting closer :)

Now I have only 2 dropdown-menu-icons when loading the page:


Attachments:

Please Log in to join the conversation.

More
10 years 5 months ago #44027 by ivan.milic
try like this instead:

if(jQuery(window).width() < 768 && !(jQuery(".tinynav")[0])) {

Please Log in to join the conversation.

Time to create page: 0.099 seconds
Powered by Kunena Forum