javascript - Need to have an iPad friendly (html) header file load when detected instead of regular flash header -
i have client wants make website ipad/iphone friendly. website has menu header made in flash. converted file using google's swiffy flash_1.html file.
when website detects ipad/iphone want load swiffy flash_1.html file. otherwise, should load site normal.
i having trouble doing this, writing correct if/else statement , having work. realize have change body tag onload regular site else since it's going function. sort of problem i'm running into.
anyways, input or appreciated! xd
this have far:
<script type="text/javascript"> if ((navigator.useragent.indexof('iphone') != -1) || (navigator.useragent.indexof('ipod') != -1) || (navigator.useragent.indexof('ipad') != -1)) { document.location = "mobile/"; $(function{ $("#includedcontent").load("flash_1.html"); }); else
the regular site's code looks this:
***note: not code appear correctly in text window, made image. (the information cut off on top functions script preloadimages, , swap images)
sniffing browser isn't way go, why not see if can run flash?
if(swfobject.hasflashplayerversion("1")) { //flash supported } else { //flash not supported }
Comments
Post a Comment