Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work for non-touchscreen browsers #1

Open
OllyHodgson opened this issue Mar 1, 2012 · 2 comments
Open

Doesn't work for non-touchscreen browsers #1

OllyHodgson opened this issue Mar 1, 2012 · 2 comments

Comments

@OllyHodgson
Copy link

This looks great :) Alas it doesn't work on non-touch (e.g. desktop) browsers that happen to be narrow. I'm guessing you'll want to check for the availability of touch events in your code, e.g.

if ('ontouchstart' in document.documentElement === true) {
    /* do stuff */ 
}
@tkenny
Copy link
Owner

tkenny commented Mar 1, 2012

It only works on page load so resizing a desktop browser won't work. You have to refresh when it's narrow enough. I tried it so that it would change on resize but it caused some issues.

@OllyHodgson
Copy link
Author

Ah, I see the problem now. It's fine in Chrome, but in both IE9 and Firefox the z-index puts nav#mobile behind div#site.

(by the way, the lack of a doctype drops IE9 into quirks mode)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants