jerkovicl
2/9/2015 - 12:27 PM

Here’s an example of how to hide a link if the OS is not supported

Here’s an example of how to hide a link if the OS is not supported

Here’s an example of how to hide a link if the OS is not supported
// If user agent does not meet criteria...
if(!navigator.userAgent.match(/iPhone|iPad|iPod|Android/i)) {
    // Get elements
    var links = document.querySelectorAll('a.mobile-deep-link');

    // Hide all the elements!
    Array.prototype.forEach.call(links, function(el) {
        el.style.display = 'none';
    });
}