Wouldn’t this work if I want to apply a new class to all H3 tags inside the RelArtik div?
$("h3",$("#RelArtik")).addClass("underrubrik");
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to the documentation jQuery should accept a jQuery object as the context so there’s no obvious reason why what you’ve written shouldn’t work.
However, it also says that:
is equivalent to:
So you could just try:
which is of course also equivalent to:
however I believe the former
.find()based solution is faster.