0

I am not very clued up about HTML5 or Jquery, and therefore I need help with the following:

I want to embed a swf in my html, but if users view the site on iOS, I need it to fallback to Jquery. I can't seem to find anything online, as most of people only explain how to do this with videos. I need a fallback to a full Jquery gallery, not just a video. Any suggestions on how this can be done?

imieliei
  • 19
  • 5

1 Answers1

0

Detect iphone or ipad device with the help of navigator.userAgent or navigator.platform then embed flash if not iphone/ipad else embed your gallery.

var iOS = ( navigator.userAgent.match(/(iPad|iPhone|iPod)/i) ? true : false );

if(!iOS){
     //render the flash
}
else {
     //render the gallery.
}
Subhash k
  • 391
  • 2
  • 3