Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Ignoring a script if the device has a touch screen (tablet, smart phone etc)

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39781
    alkan
    Participant

    Hello, I’m new here – this is my first post.

    I’ve recently created a horizontally scrolling photography website, which uses the “scrollTo” jquery plugin to aid the user in navigating photos (they can still of course use the regular browser scroll bar is they choose to) if the user clicks on a photo the browser automatically scrolls until it is centred.

    However on actual touch screen devices, the script causes quite a few issues, given that the regular touch and drag scrolling implementation of touch screen browsers works so well with the site anyway, I’d really like to be able to detect if the device has a touch screen and disable the javascript.

    Is this possible?

    thanks.

    #109765
    alkan
    Participant

    Thanks I’ll take a look – looks complicated!

    #110030
    alkan
    Participant

    Got this working finally, thanks Andy.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.