905 posts
  • Author Level 3
  • Affiliate Level 1
  • Collector Level 2
  • 4 Years of Membership
+4 more
infuse01
says

I’m currently in the process of creating my next item and came across that a responsive layout through media queries is all good but what about the javascript. For example tooltips or even hover effects aren’t needed on mobile phones. How would I pass them properly?

I already know about responsejs, but how are you doing it? Any alternatives? Is responsivejs the way to go? Any feedback would be appreciated as usual :)

31 posts
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
+6 more
Brankic1979
says
I’m using this function
function is_touch_device() {
  return !!('ontouchstart' in window);
}
.
.
.
if (is_touch_device()){
do something only on mobile devices
} else {
do something only on not mobile devices
}
1763 posts How's the surf doing?
  • Power Elite Author
  • Trendsetter
  • Top Monthly Author
  • Community Superstar
+10 more
tommusrhodus
says

Create a custom Modernizr script to detect touch devices,

call custom .js when touch devices are detected using that script :)

by
by
by
by
by
by