Questions tagged [browser-feature-detection]

Feature detection is the practice in web development of determining whether a browser or device supports a certain feature, so as to provide fallbacks for older browsers or allow enhanced functionality in more capable modern browsers.

Feature detection is the practice in web development of determining whether a browser or device supports a certain feature, so as to provide fallbacks for older browsers or allow enhanced functionality in more capable modern browsers.

160 questions
0
votes
1 answer

Modernizr tests/YepNope on Wordpress page

For the last few hours I've tried getting YepNope and some Modernizr tests working, but without any luck. Modernizr is loaded in the head, jQuery, plugins.js and script.js at the bottom of the page (in that order). Nothing fancy, but handy because…
Sven
  • 12,997
  • 27
  • 90
  • 148
0
votes
2 answers

Testing for media queries in yepnope.js - false positive or...?

I am using this code to test for media query support as I want to load a polyfill for e.g. IE8. yepnope({ test : Modernizr.mq('(only all)'), nope : ['scripts/respond.js'] }); It works (= respond.js gets loaded in oder IE), but now I've just…
Sven
  • 12,997
  • 27
  • 90
  • 148
0
votes
0 answers

How to detect phone function

I am building an html5 web-app which will hopefully be mainly run from a mobile device. The app has a phone number which when clicked, calls the number displayed. This works great if the user is using an iPhone or Android etc, but what if the user…
Typhoon101
  • 2,063
  • 8
  • 32
  • 49
0
votes
1 answer

Detect browsers with no native mouse support with Javascript without user-agent sniffing?

I am writing a game for both desktop and mobile browsers which involves selecting objects by dragging it to a target. The user is allowed to select objects by clicking only if dragging is impossible with the user's browser. On Windows Phone, all…
0
votes
1 answer

Feature detection is not working for events in Internet Explorer

I'm trying to write a cross-browser event addition method but it's not working in IE at all, here's the code : index.html