I am trying to simply hide/show an element depending if you're on mac, windows, iphone, ipad etc.
I have 2 p elements: p1 - I want to show on windows p2 - I want to show on everything else (mac/iphone/ipad etc)
I found a script here that apparently detects operating system: http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/
So I linked to the script after a link to jquery, plus this to the page head:
if ($.client.os == 'Mac') {
$('#download').hide(); $('#register').show();
}
if ($.client.os == 'iPhone') {
$('#download').hide(); $('#register').show();
}
if ($.client.os == 'Windows') {
$('#download').show(); $('#register').hide();
}
I cannot get it to work, any ideas?