Just to be sure I got it right...
myArray.removeClass('className');
will remove the class named "className" from ALL objects added to that array, yes?
ADDENDUM:
<div id="parentEle">
<div id="ele1"></div>
<div id="ele2"></div>
</div>
#ele1 {
//CSS
}
#ele1.className {
//CSS
}
#ele2 {
//CSS
}
#ele2.className {
//CSS
}
var myArray = [];
$('div','#parentEle').each(function() {
myArray.push($(this));
});
// now to remove the class from both...
TypeError: Object [object Array] has no method 'removeClass'. Are you actually talking about jQuery instead?$('.class')vs[$('.class')[0], $('.class')[1])? They are two different things. Anyway, if it is actually a jQuery object it will work as expected.removeClass()method and answered this yourself.