Ice Cream Flavours - Selectors

Ice Cream Flavours – Selectors jQuery Cognizant Handson Program

A web page contains a list of different types of ice creams with different flavors.  Write a jQuery script to perform the below activities:

1.  Change the font color of all the paragraph tags in the web page into ‘orange‘.

2.  The background color of all list of ice creams that belong to the class ‘flavours‘ should be ‘light blue’ and font size should be 120%

3.  Set the second paragraph font size as 50%

4.  If the ‘id’ of  any list of ice creams is ‘icecreamfloats’, then set its background color as ‘orange‘

script.js

// WRITE YOUR CODE HERE

$('p').css('color','orange');
$('p:last').css('font-size','50%');
$('.flavours > li').css('background-color','lightblue');
$('#icecreamfloats > li').css('background-color','orange');
$('.flavours').css('font-size','120%');

Similar Posts