Reading the docs, I’d expect $("#wrap2").remove(".error") to remove all .error elements from #wrap2. However looking at this JSFiddle: http://jsfiddle.net/hCGUS/ it doesn’t appear to be the case?
$(function() {
$("#wrap1 .error").remove(); // works
$("#wrap2").remove(".error"); // fails ...
})
According to the jQuery document. I think
equals to:
Means that an element has id
wrap2and classerror