jQuery Multiple choices

Total available count: 24
Subject - JavaScript Frameworks
Subsubject - jQuery

Which jQuery method is used to set one or more style properties for selected elements?







Definition and Usage
The CSS() method is used to sets or returns one or more style properties for the selected elements.

When used to return properties:
This method returns the specified CSS property value of the FIRST matched element. However, shorthand CSS properties (like "background" and "border") are not fully supported and may give different results in different browsers.

When used to set properties:
This method sets the specified CSS property for ALL matched elements.

Return the CSS property value:


Set the CSS property and value:


Set CSS property and value using a function:


Set multiple properties and values:

$(selector).css({property:value, property:value, ...});

Set the color property of all <p> elements:

 $("p").css("color", "red");


Next 5 multiple choice(s)


Which jQuery method is used to hide selected elements?


With jQuery, look at the following selector: $("div.intro"). What does it select?


What is the correct jQuery code to set the background color of all p elements to red?


The jQuery html() method works for both HTML and XML documents


Is it possible to use jQuery together with AJAX?