How to add a CSS class?

I have this code in jquery.

$(this).parent()

I want to add a CSS class mycssclass into this element. how to do this ?

$(this).parent().addClass( "mycssclass" );

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.