Jquery 过滤器(first,last,not,even,odd)应用
2014-01-22 09:13
295 查看
$(function(){ $("#menu li:first").click(function(){ $(this).addClass("b"); }); $("#menu li:last").text("最后");//id为menu的li列表中最后一个li元素插入文字“最后” $("#menu li:first").text("第一");//li列表中第一个li元素插入文字“第一” $("#menu li:not(.on)").text("on");//li列表中样式不是class="on"的li元素插入文字“on” $("#menu li:even").text("奇数行"); $("#menu li:odd").text("偶数行"); });
相关文章推荐
- Jquery 过滤器(first,last,not,even,odd)的使用
- Jquery 过滤器(first,last,not,even,odd)的使用
- jQuery——jQuery基础方法first()/last()/not(CSS选择器)/even/odd/eq(index)/gt(index)/lt(index)
- jquery过滤器(first,last,not,even,odd简单应用)
- jquery基本过滤选择器:first :last :not(.myclass) :even :odd :eq(1) :gt(5) :lt(1) :header :animated :focus
- 知识点七:jQuery 遍历 - 过滤first(), last() 和 eq(),filter() 和 not()
- jquery笔记:筛选 eq,first,last,filter,is,has, not, children,closest, nextUntil,parents,parentsUntil.....
- jQuery 遍历 - 过滤---first--last---eq--not--filter方法(二十五)
- jQuery1.4.2中关于:not(:first)一个问题
- Visiting the Ikea stores can be very overwhelming even if it is not your first time. If it is your first time
- CSS3选择器:属性、:root、:not、:empty、:target、first-child、last-child....
- 浅谈jQuery中对象遍历.eq().first().last().slice()方法
- Oracle应用专题之:分析函数3(Top/Bottom N、First/Last、NTile)
- jQuery1.4.2中关于:not(:first)一个问题
- Grid - last row not removed when deleted even though reload
- Jquery 筛选(first last eq slices)
- 实战c++中的vector系列--vector应用之STL的find、find_if、find_end、find_first_of、find_if_not(C++11)
- jQuery1.4.2中关于:not(:first)一个问题
- Oracle应用专题之:分析函数3(Top/Bottom N、First/Last、NTile)
- JQuery - first/last child selector