Which method in jQuery is used to set the CSS properties of elements?
Correct answer
C. css()
16 views
C. css()
16 views
css() gets or sets style properties: $("p").css("color", "red") sets one property, and passing an object sets several at once.
For anything beyond small changes, addClass() and removeClass() are cleaner. style(), setStyle() and applyStyle() do not exist in jQuery.
Keep preparing with more Computer Science MCQs on MCQsExam.com.
Not sure why the answer is C? Ask here and get an explanation.