I found code on here some while ago. I'm trying to have my href link redirect based on the device viewing the page. This is what I originally found:
$(document).ready(function($){
var deviceAgent = navigator.userAgent.toLowerCase();
var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
if (agentID) {
$('#myLink').attr('href', 'http://example.com/useiOSapp.html');
}else
{ $('#myLink').attr('href', 'http://example.com/flash-app-page.html'); }
});
But on this code, I'm getting the following error: Adjacent JSX elements must be wrapped in an enclosing tag (3:0)
Any ideas?