0

I am working on a simple page that lets you preview a mobile website in a desktop browser. It is similar to http://transloc.com/mdemo/. The idea is that I want to show an unmodified version of the mobile site inside an iframe, and allow scrolling up and down. However, I'd like to hide the scrollbar and let users scroll only using the mouse wheel or up/down keyboard keys if the iframe has focus. Is this possible without modifying any HTML/CSS/JS inside mobile site?

ipartola
  • 1,612
  • 3
  • 15
  • 25
  • Do you want to include the site from another domain or do you use a kind of proxy to make it same origin ? – Denys Séguret Mar 11 '13 at 18:33
  • This is probably answered here: http://stackoverflow.com/questions/1326570/how-to-disable-browser-or-element-scrollbar-but-allow-scrolling-with-wheel-or-a – scott.korin Mar 11 '13 at 18:34
  • @dystroy A subdomain I control. – ipartola Mar 11 '13 at 18:38
  • A subdomain is a different origin so I don't think this will be easy (but there might be solutions based on transparent div over the iframe for example). – Denys Séguret Mar 11 '13 at 18:39
  • @scott.korin That's the approach I thought of, except that requires code to run inside the iframe that's not applicable to the mobile site. I suppose then it becomes an issue of reliably injecting this code into the iframe from the containing page. – ipartola Mar 11 '13 at 18:40

0 Answers0