What is the difference between .css() and .addClass() in jQuery?
Instruction: Explain the difference between these two jQuery methods and provide a use case for each.
Context: This question evaluates the candidate's understanding of jQuery methods for manipulating element styling.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
At its core, the .css() method in jQuery is used to directly get or set style properties on selected elements. When you're using .css(), you're either retrieving the value of a specific style property or you're applying inline styles to elements...