×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Which is the correct jQuery statement to change the color of all <p> elements which are sibling elements of <pre>?

96. Which is the correct jQuery statement to change the color of all <p> elements which are sibling elements of <pre>?

  1. $("#pre").siblings("p").css({"color": "red"});
  2. $(".pre").siblings("p").css({"color": "red"});
  3. $("pre").siblings(".p").css({"color": "red"});
  4. $("pre").siblings("p").css({"color": "red"});

Answer: D) $("pre").siblings("p").css({"color": "red"});

Explanation:

The correct jQuery statement to change the color of all <p> elements which are sibling elements of <pre> is:

$("pre").siblings("p").css({"color": "red"});

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.