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.

Go back to exercise list.

Purpose

The purpose of the exercise is practice using the fancy features of jQuery library.

Instructions

  1. 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
  2. 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
  3. 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.