icon for lab

CT310

Recitation 12 - jQuery

In this recitation, we will:


A lightweight JavaScript library: "write less, do more"

Simpliflies many complex JS tasks

But does the same things!

It is referenced using the source: "jquery-3.3.1.min.js

$(selector).action()

This is a function that changes the text of the "bar" element to "hello". The HTML button would need to be given the onclick attribute.

This gives the element with id "btn" an EventListener for onclick that changes the "bar" element's text to "hello".

Click here to reach another example