http://jsfiddle.net/defencedog/2Skc7/
I am trying to remove the online class ONLY for administration which has a unique url namaley /u1. The idea is to scan all the divs containing TWO classes namely post (users reply) & online (users currently logged in). Then check whether this reply or div is from administration, then remove the online class thereby removing the online picture that is floating left.
Any ideas would be appreciated
x[i]is not a jQuery element in your example so you cannot call jQuery methods such as.has()and.removeClass()on it. So you could wrap it in a jQuery object:or: