using .filter in a collection of html elements will have the same effect, provided that oneElement is a suitable object:
$$("img").filter(function(el) {
return el !== oneElement;
}).fade(.3);
, mootools, , :
Array.implement({
not: function(skipEl) {
return skipEl ? this.filter(function(el) {
return el !== skipEl;
}) : this;
}
});
var divs = document.getElements("div");
var redDiv = document.getElement("div.red");
divs.not(redDiv).fade(.2);
. : http://www.jsfiddle.net/dimitar/Z9MNe/
:
<div ></div>
<div ></div>
<div ></div>
<div class="red" ></div>
<div ></div>
FunFactor irc, , , :
$$('div.something:not(#someId)') , , this onClick.