What's the best way to check if the browser supports html5 using jQuery?
I want to use a fallback solution for HTML5 / flash audio players.
I wonder if I can use jQuery to check if HTML5 is supported.
I know there is .support() ( http://api.jquery.com/jQuery.support/ ) but I'm not sure which would be a bullet proof check.
You can test for HTML5 features using Modernizr.
Try Modernizr. From documentation:
var audio = new Audio(); audio.src = Modernizr.audio.ogg ? 'background.ogg' : Modernizr.audio.mp3 ? 'background.mp3' : 'background.m4a'; audio.play();
EDIT: Now that the question has changed, this might be more in line with what you need.