Hour 22 Code Samples – Sams Teach Yourself Responsive Web Design in 24 Hours
Listing 22.1
if (Modernizr.geolocation) { // add your geolocation functions here alert("This browser supports Geolocation."); } else { // add your fallback functions here alert("This browser does not support Geolocation."); }