Addclass to element of object

Hello experts.
I need help to add a class to a tags aof an element
//par is the div container object
var par = $(this).parent();

Now i need to add "top" class to the 'a' tags inside the 'par' object

Any help?
LVL 2
PanosAsked:
Who is Participating?
 
leakim971Connect With a Mentor PluritechnicianCommented:
$("a", par).addClass("top");

or :

par.find("a").addClass("top");
0
 
PanosAuthor Commented:
Thank you very much
regards
panos
0
 
leakim971PluritechnicianCommented:
You're welcome! Have a nice sunday!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.