Exercise 11.6
This is Exercise 11.6, lecture on using the jQuery library, used in the course IDATA2301 Web technologies at NTNU, campus Aalesund.
Purpose
The purpose of the exercise is practice using the fancy features of jQuery library.
Instructions
-
Create a new HTML document. Include jQuery library in it. There are
several ways to do that. Suggested way: include this external
.js
file:https://code.jquery.com/jquery-3.6.4.min.js
-
Create five text paragraphs with any text inside. Hint: if your IDE
supports emmet, you can write the following expression to get 5
paragraphs with Lorem Ipsum text with 10 words in each
paragraph:
(p>lipsum10)*5
-
When the document is loaded, run a jQuery code which replaces text in
all paragraphs on the page with "jQuery woz ere". Hint: in jQuery you
can use
$(document).ready(function() {...})
to execute code when the document is loaded. See jQuery documentation.
Solution
You can find a solution here.