使用 jQuery UI Accordion 和 iFrame 时出现问题
我更像是一名设计师而不是开发人员,所以我希望有人可以帮助我解决这个问题。我正在使用 jQuery UI Accordion 来显示内容。当我只有文字和信息时链接它表现良好。但是,我想展示视频,并且希望拥有 iPhone 和 iPad 的人能够看到它,因此我使用 Vimeo 提供的 iFrame 来检查用户的浏览器和视频。操作系统并以 HTML 5 或 Flash 动态交付视频。
jQuery UI Accordion 和 iFrame 在桌面浏览器上运行得很好(尽管 FF 有点笨拙),但是当我在 iPhone 和 iPad 上测试它时,它不起作用。基本上第一个项目是可见且可用的,但是当我尝试选择另一个项目时,它看起来像是隐藏了内容。请查看此处。您会发现它在桌面浏览器上运行良好,但在 iPhone 和 iPad 上却出现问题。如果您没有 iPhone 或 iPad 来查看,这里有一个图片
可以看到所有的内容都被隐藏了。当我单击第二个项目时,手风琴仍然有动画,但没有任何内容可见。
这是我在脑海中使用的内容
<script type='text/javascript' src='Scripts/jquery-1.5.1.min.js'></script>
<script type='text/javascript' src='Scripts/jquery-ui-1.8.14.custom.min.js'></script>
<link rel="stylesheet" href="css/south-street/jquery-ui.css" type="text/css" />
这是我在身体中使用的内容
<td width="626"><div id="jQueryUIAccordion" >
<h3><a href="#">The Skin Spa</a></h3>
<div>
<iframe src="http://player.vimeo.com/video/7691842?title=0&byline=0&portrait=0" width="540" height="304" frameborder="0"></iframe>
<p class="TM-Font1"><a href="http://www.skinspanewyork.com/" target="_new">The Skin Spa</a>, skin treatment center, wanted to inform their customers on some of the most popular procedures being performed and what they entailed. Tonangi Design & Media created 5 separate movies that are showcased on their website as well as on flat screen televisions in their spa locations. <strong>View the rest of the videos that we produced for the Skin Spa</strong>: <a href="port_photolight.html"path/to/pop-page.htm" target="page" onClick="window.open('','page','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=640,height=400,left=0,top=0,titlebar=no')">Photolight</a> | <a href="port_skint.html"path/to/pop-page.htm" target="page" onClick="window.open('','page','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=400,left=0,top=0,titlebar=no')">Skin Tightening</a>| <a href="port_hair.html"path/to/pop-page.htm" target="page" onClick="window.open('','page','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=400,left=0,top=0,titlebar=no')">Hair Removal</a> | <a href="port_micro.html"path/to/pop-page.htm" target="page" onClick="window.open('','page','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=400,left=0,top=0,titlebar=no')">Microdermabrasion</a></p>
<p class="TM-Font1"><strong>> <a href="portfolio_comm.html">Check out our TV & Web commercials</a></strong></p>
</div>
<h3><a href="#">Hook Up Your Dorm</a></h3>
<div>
<iframe src="http://player.vimeo.com/video/9719129?title=0&byline=0&portrait=0" width="540" height="304" frameborder="0"></iframe>
<p class="TM-Font1"><a href="http://www.hookupyourdorm.com/" target="_new">Hook Up Your Dorm</a> needed to explain their unique service to their customers. Since the bulk of their users would be high school students about to move into a college dorm, the web video had to be concise yet descriptive. The video is used on their website today.</p>
<p class="TM-Font1"><strong>> <a href="portfolio_comm.html">Check out our TV & Web commercials</a></strong></p>
</div>
注释:起初我直接使用 Google 的代码,但我认为可能存在错误所以我去尝试获取最新最好的。
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js'></script>
<style type="text/css">
@import url("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/south-street/jquery-ui.css");
任何帮助都将非常感激!
I'm more of a designer than a developer so I'm hoping someone can help me out with this issue. I'm using a jQuery UI Accordion to display content. When all I have is text & links it performs fine. However, I want to showcase video and I want people with iPhones and iPads to be able to see it, so I'm using an iFrame that Vimeo provides to check the user's browser & OS and dynamically deliver the video in HTML 5 or Flash.
The jQuery UI Accordion and iFrame works great on desktop browsers (although a little clunky of FF), but when I test it on my iPhone and iPad it doesn't work. Basically the first item is visible and usable, but the minute I try to select another item it looks like it's hiding the content. Check it out here. You'll see that it works fine on a desktop browser, but it's broken on iPhones and iPads. If you don't have an iPhone or an iPad to look at it here is an image
As you can see all of the content is hidden. The accordion still animates when I click on the 2nd item but none of the content is visible.
Here is what I'm using in my head
<script type='text/javascript' src='Scripts/jquery-1.5.1.min.js'></script>
<script type='text/javascript' src='Scripts/jquery-ui-1.8.14.custom.min.js'></script>
<link rel="stylesheet" href="css/south-street/jquery-ui.css" type="text/css" />
Here is what I'm using in my body
<td width="626"><div id="jQueryUIAccordion" >
<h3><a href="#">The Skin Spa</a></h3>
<div>
<iframe src="http://player.vimeo.com/video/7691842?title=0&byline=0&portrait=0" width="540" height="304" frameborder="0"></iframe>
<p class="TM-Font1"><a href="http://www.skinspanewyork.com/" target="_new">The Skin Spa</a>, skin treatment center, wanted to inform their customers on some of the most popular procedures being performed and what they entailed. Tonangi Design & Media created 5 separate movies that are showcased on their website as well as on flat screen televisions in their spa locations. <strong>View the rest of the videos that we produced for the Skin Spa</strong>: <a href="port_photolight.html"path/to/pop-page.htm" target="page" onClick="window.open('','page','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=640,height=400,left=0,top=0,titlebar=no')">Photolight</a> | <a href="port_skint.html"path/to/pop-page.htm" target="page" onClick="window.open('','page','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=400,left=0,top=0,titlebar=no')">Skin Tightening</a>| <a href="port_hair.html"path/to/pop-page.htm" target="page" onClick="window.open('','page','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=400,left=0,top=0,titlebar=no')">Hair Removal</a> | <a href="port_micro.html"path/to/pop-page.htm" target="page" onClick="window.open('','page','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=400,left=0,top=0,titlebar=no')">Microdermabrasion</a></p>
<p class="TM-Font1"><strong>> <a href="portfolio_comm.html">Check out our TV & Web commercials</a></strong></p>
</div>
<h3><a href="#">Hook Up Your Dorm</a></h3>
<div>
<iframe src="http://player.vimeo.com/video/9719129?title=0&byline=0&portrait=0" width="540" height="304" frameborder="0"></iframe>
<p class="TM-Font1"><a href="http://www.hookupyourdorm.com/" target="_new">Hook Up Your Dorm</a> needed to explain their unique service to their customers. Since the bulk of their users would be high school students about to move into a college dorm, the web video had to be concise yet descriptive. The video is used on their website today.</p>
<p class="TM-Font1"><strong>> <a href="portfolio_comm.html">Check out our TV & Web commercials</a></strong></p>
</div>
Notes: At first I was using the code right off of Google, but I thought there may have been a bug so I went and tried to get the latest and greatest.
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js'></script>
<style type="text/css">
@import url("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/south-street/jquery-ui.css");
Any help at all would be extremely appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
iPhone 和 iPad 都使用 WebKit 作为渲染引擎。
因此,无论您是在 iPhone/iPad 还是 Safari 浏览器上进行测试,绝对没有什么区别。
我无法重现此问题。
iPhone and the iPad both use WebKit as their Rendering Engine.
So there should absolutely be little to no difference wether you are testing this on iPhone/iPad or Safari browser.
I was unable to reproduce this issue.