Return to Snippet

Revision: 62188
at February 7, 2013 05:15 by ibob


Initial Code
<div id="ios_content" style="display:none;">
	<img src="assets/2012images/homepage-12.jpg" alt="You are now in Richard Petty's Garage!">
</div>
<div id="desktop_content" style="display:none;">
	<object width="741" height="455" data="assets/flash/animation.swf" type="application/x-shockwave-flash">
		<param name="src" value="assets/flash/animation.swf" />
	</object>
</div>
<script type="text/javascript">
	var isiPad = navigator.userAgent.match(/iPad/i) != null;
	var isiPhone = navigator.userAgent.match(/iPhone/i) != null;
	var isiPod = navigator.userAgent.match(/iPod/i) != null;
	var content = "";
	if(isiPad==true || isiPhone==true || isiPod==true)
 		document.getElementById('ios_content').style.display="block";
	else
	   document.getElementById('desktop_content').style.display="block";
</script>

Initial URL

                                

Initial Description

                                

Initial Title
Javascript iOS / Desktop detection

Initial Tags

                                

Initial Language
HTML