开发者

Detect iOS Browser (Iphone,Ipod,Ipad) Change DIV from FLASH TO HTML5

I want to change ONLY the DIV if site is open in iPad,iPod,iPhone Safari in short i want to add HTML5 Music Player if site is open in Ios Device is it possible to only change the DIV n not the whole page ? after browser detection开发者_Python百科.


I want to change ONLY the DIV if site is open in iPad,iPod,iPhone Safari

The trend these days has been away from browser detection, and towards feature-support detection.

Google has some Javascript code to detect Flash support (as do others, but this is a decent example):

http://code.google.com/p/doctype/wiki/ArticleDetectFlash

is it possible to only change the DIV n not the whole page

Absolutely, this is pretty standard javascript stuff. There are a million different ways to do this. If you're using jQuery, I'd start by looking at some of the DOM manipulation functions: http://api.jquery.com/category/manipulation/ and going from there. Of course, this is easily possible without jQuery or any other JS framework. But that seems like it's beyond the scope of this question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜