not(expr)
从当前匹配元素集合中删除满足‘expr’的匹配元素集合。得到新匹配元素集合
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div").not(".green, #blueone")
.css("border-color", "red");
});
</script>
<style>
div { width:60px; height:60px; margin:10px; float:left;
background:yellow; border:2px solid white; }
.green { background:#8f8; }
.gray { background:#ccc; }
#blueone { background:#99f; }
</style>
</head>
<body>
<div></div>
<div id="blueone"></div>
<div></div>
<div class="green"></div>
<div class="green"></div>
<div class="gray"></div>
<div></div>
</body>
</html>
$("div").not(".green, #blueone")
删除div元素集合中,特殊样式为‘green’和元素id属性值为‘blueone’的元素。形成新元素集合。以下为新元素集合
<div></div>
<div></div>
<div class="gray"></div>
<div></div>
分享到:
相关推荐
not(expr|ele|fn) slice(start,[end]) 查找 children([expr]) closest(expr,[con]|obj|ele)1.6* find(expr|obj|ele)1.6* next([expr]) nextall([expr]) nextUntil([exp|ele][,fil])1.6* offsetParent() ...
本文实例讲述了jQuery中not()方法用法。分享给大家供大家参考。具体分析如下: 此方法删除与指定表达式匹配的元素。 语法结构一: 代码如下:$(selector).not(expr) 参数列表: 参数 描述 expr 字符串值,定义...
5.1.10 not(expr) 77 5.1.11 slice(start, [end]) 77 5.2 查找 79 5.2.1 children([expr]) 79 5.2.2 closest(expr, [context]) 79 5.2.3 find(expr) 81 5.2.4 next([expr]) 81 5.2.5 nextAll([expr]) 82 5.2.6 ...
主要以示例介绍了jquery中 $.expr使用,需要的朋友可以参考下
返回值:jQuery 参数: expr (String) : (可选) 用以过滤子元素的表达式。 示例: 查找DIV中的每个子元素。 HTML 代码: 代码如下: <p>Hello</p><div><span>Hello Again</span></div><p>And Again</p> jQuery 代码: ...
jQuery(expr, [context]) jQuery(html, [ownerDoc]) jQuery(elements) jQuery(callback) jQuery 对象访问 each(callback) size() length selector context get() get(index) index(subject) 数据缓存 ...
考虑Web可访问性的JQuery插件创建过程课堂上要讲的内容创建jQuery自定义伪类选择器(面向更改) jQuery方法覆盖jQuery skipNav,navigationMenu插件制作jQuery.expr.pseudos扩展Sizzle引擎扩展自定义虚拟选择器的新...
jQuery(expr, [context]) jQuery(html, [ownerDoc]) jQuery(html, props) jQuery(elements) jQuery() jQuery(callback) jQuery 对象访问 each(callback) size() length selector context get() get...
public class TestExpr4j { /** * @param args */ public static void main(String[] args) { SimpleEvaluationContext context = new SimpleEvaluationContext(); System.out.println("Expr ...
jQuery $(String expr,Element|jQuery context) 这个函数接收一个包含CSS或基本的XPath选择符的字符串,然后用这个字符串去匹配一组元素。 jQuery $.extent(Object prop) 扩展jQuery对象 Object $.extent(Object ...
jQuery(expr, [context]) jQuery(html, [ownerDoc]) jQuery(elements) jQuery(callback) jQuery 对象访问 each(callback) size() length selector context get() get(index) index(subject) 数据缓存 ...
jQuery(expr, [context]) jQuery(html, [ownerDoc]) jQuery(elements) jQuery(callback) jQuery 对象访问 each(callback) size() length selector context get() get(index) index(subject) 数据缓存 ...
jQuery.parent(expr) 找父亲节点,可以传入expr进行过滤,比如$(“span”).parent()或者$(“span”).parent(“.class”) jQuery.parents(expr),类似于jQuery.parents(expr),但是是查找所有祖先元素,不限于父元素 ...
:nth-child(expr) :first-child :last-child :only-child Attribute Filters [attribute] [attribute=value] [attribute!=value] [attribute^=value] [attribute$=value] [attribute*=value] [attribute|=value] ...
jQuery.parent(expr) 找父亲节点,可以传入expr进行过滤,比如$(“span”).parent()或者$(“span”).parent(“.class”) jQuery.parents(expr),类似于jQuery.parents(expr),但是是查找所有祖先元素,不限于父元素 ...
not(expr|ele|fn) slice(start,[end]) 查找 children([expr]) closest(e|o|e)1.7* find(e|o|e) next([expr]) nextall([expr]) nextUntil([e|e][,f]) offsetParent() parent([expr]) parents([expr]) ...