开发者

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

开发者 https://www.devze.com 2023-03-31 22:44 出处:网络
I want tochange 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

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

精彩评论

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