How do I add a css class to an Div element in JQuery? I have a DIV with a css class and the div contains a form. After clicking on submit I want the original css class to disapp
Since OP didn't mention any ids I would go with a class selector and picking the first element in collection (which could be wrong, offcourse).
$(".OriginalClass").removeClass("OriginalClass").addClass("blah");
The original example was wrong, as the elements in the collection are regular objects and as such they don't have the removeClass and addClass methods.
The current example removes the class for all elements, which is still flawed, but in my opinion works better with what OP wanted.