December 2013
Intermediate to advanced
384 pages
9h 54m
English
var items = $("span"); items.css({color:"red"}); //colors text in all <span> elements red items.remove(".menu"): items.css({"font_weight":"bold"}); //set all <span> elements except .menu to bold
Another great feature of jQuery is how easy it is to remove items from and add additional elements to the jQuery object set. The .remove([selector]) method will remove elements that match the selector from the set represented by the jQuery object. Calling .remove() with no selector will remove all elements from the set.
Read now
Unlock full access