1

I'm new to all this so thanks for being patient. Ok so I'm building a site with a Floating Javascript menu. The original code is from: Jtricks Absolute Floating Menu

Here's the issue: When viewing the site in a mobile browser, zooming in initially caused the floating javascript menu to leave the far left of the page and cover content on the page. I fixed this by locking it into a fixed width div on the left side of the page.

Now the issue I have is, I don't want the fancy animation of the javascript. A simple CSS script for a fixed window is fine. The only issue is, everything I've tried has done the same "free floating" thing when zoomed in on mobile browsers and I can't seem to find a fix.

Anyone have any ideas?

Ron Cassel
  • 11
  • 1

2 Answers2

0

Well, I guess that's exactly the behaviour of a fixed-positioned element. What you want is the menu to work like a fixed one when zoom is at 100% and then to act like a relative or absolute-positioned one when the screen zooms in. And here's a way to detect zooming. I hope that helps.

Community
  • 1
  • 1
BeetleTheNeato
  • 391
  • 1
  • 4
  • 14
0

I use the "Jtricks Absolute Floating Menu". To make the zoom work on it you have to remove one line in the function documentHeight. This line is "html.clientHeight,". Do the same for function documentWidth by removing line : "html.clientWidth,".

I have reported this bug to the creator.

Hope this help.