Tab 疯狂中的 Iframe!
我到处搜索并找到了可能的解决方案,但它们并不能完全按照我需要的方式工作。 我对 jQuery 很陌生,但我正在尝试:-)
我有一个位于选项卡中的 iframe (由 jQuery 提供支持的选项卡)
在第三个选项卡中有一个包含幻灯片的 iframe
我的问题:
当我单击包含 iframe 的第三个选项卡时,所有控件都会出现,轮播似乎正在工作,但是......没有图片! !!
Firefox 帮助我找到了解决问题的方法,现在我只需要找到解决问题的方法。
在 Firefox 中,当我右键单击 iframe 并转到此框架 -> 重新加载框架 瞧! 图片回来了!
问题:
jQuery 是否可以判断何时选择第三个选项卡,并在选择第三个选项卡时刷新包含 iframe 的 div?
选项卡代码:
<script type="text/javascript" charset="utf-8">
$(function () {
var tabContainers = $('div.tabs > div');
tabContainers.hide().filter(':first').show();
$('div.tabs ul.tabNavigation a').click(function () {
tabContainers.hide();
tabContainers.filter(this.hash).show();
$('div.tabs ul.tabNavigation a').removeClass('selected');
$(this).addClass('selected');
return false;
}).filter(':first').click();
});
</script>
测试页面可以在这里找到:http://artitechture.com/blah/tabs.html< /a>
任何帮助将不胜感激...我想学习!
I've searched all over and have found possible solutions but they don't quite work how i need them to. I am really new to jQuery but I'm trying :-)
I have an iframe that sits in a Tab
( Tabs powered by jQuery)
In the third tab sits an iframe that holds a slideshow
My problem:
When I click on the third tab which houses the iframe all the controls appear, the carousel seems to be working, but ...no pictures!!!
Firefox helped me find what fixes the problem, now i just need to find a way to do fix it.
In Firefox when i right click on the iframe and go to This frame -> Reload Frame
VOILA! Pictures are back!
Question:
Is it possible with jQuery to tell when the third tab is selected and to refresh a div which contains the iframe when that third tab is selected?
Tab Code:
<script type="text/javascript" charset="utf-8">
$(function () {
var tabContainers = $('div.tabs > div');
tabContainers.hide().filter(':first').show();
$('div.tabs ul.tabNavigation a').click(function () {
tabContainers.hide();
tabContainers.filter(this.hash).show();
$('div.tabs ul.tabNavigation a').removeClass('selected');
$(this).addClass('selected');
return false;
}).filter(':first').click();
});
</script>
Test page can be found here: http://artitechture.com/blah/tabs.html
Any help would be appreciated...I want to learn!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 iframe 中,您有一个文档就绪方法,尝试调用 pngfix() 插件方法,但这尚未包含在 iframe 中。 这不会有帮助。
Within the iframe you have a doc ready method that tries to call the pngfix() plugin method however this has not been included within the iframe. This will not help.