ThemeForest

"Responsive Javascript"

860 posts
  • Microlancer Beta Tester
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Sold between 100 and 1 000 dollars
  • Bought between 1 and 9 items
  • Referred between 1 and 9 users
  • Most Wanted Bounty Winner
  • Grew a moustache for the Envato Movember competition
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 :)

26 posts
  • Elite Author
  • Has been a member for 3-4 years
  • Sold between 250 000 and 1 000 000 dollars
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Referred between 500 and 999 users
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
}
295 posts
  • Elite Author
  • Exclusive Author
  • Has been a member for 1-2 years
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
  • Microlancer Beta Tester
  • Referred between 10 and 49 users
  • Bought between 1 and 9 items
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