Hi Mat,

I use the following JS code snippet to detect a touch based device (my 
Nexus 7):

    var touchAbility = false;

    if ('ontouchstart' in document.documentElement) {
        touchAbility = true;
    }
    else { touchAbility = false }

It helps me to set some CSS properties on the fly (hide some elements with 
display:none or to set some sizes etc.).
Hope that helps a bit.

Regards,
Albert

Am Dienstag, 25. Juni 2013 23:21:28 UTC+2 schrieb Mat:
>
> Is there a way to make TW sense/detect what type of device it's on?
> What I'm hoping for is to use hideWhen to hide sidebars if it's via mobile 
> device.
>
> Thank you!
>
> <:-)
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to