Skip to content

Doesn't work for non-touchscreen browsers #1

@OllyHodgson

Description

@OllyHodgson

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 */ 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions