Jquery text()比较IE7中的标题 [英] Jquery text() compare to title in IE7
本文介绍了Jquery text()比较IE7中的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在回答我最后一个问题时:
In response to my last question here:
我有一个成功的工作除IE7以外的所有浏览器。IE 8,9 FF 5,6 Safari和Chrome都可以正确实现我的代码,除了ie7。
I have a got it succesfully working in all browsers except IE 7. IE 8,9 FF 5,6 Safari and Chrome all can implement my code correctly except ie7.
有人建议吗?
小提琴
http://jsfiddle.net/arkjoseph/3FrDY /
推荐答案
DEMO
DEMO
$("ul.nav li").click(function() {
var i = $(this).index();
$(".slideMove .slide").fadeOut("slow");
$('.slideMove .slide:eq('+i+')').fadeIn('slow');
});
我认为你是很复杂的东西,可以很简单。
I think you are complicating something that can be very simple.
如果您有(例如)三种导航:
If you have (for example) three navigations:
li
li
li
和三个标签:
标签
标签
标签
最简单的方法是抓取 / code>:code>:
: c>使用SAME 索引 >选择器。
The easiest way is to grab the index
number of the 'action button li' that will trigger the 'tab' with SAME index using the jQuery's :eq()
selector.
- 这样做 - 防止由于(总是可能的)编辑器打字错误导致的代码制动。
jQuery API文件:
:eq()
。index()
jQuery API Docs:
:eq()
.index()
这篇关于Jquery text()比较IE7中的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文