jQuery tutorial

Write less JavaScript and do more: select, change and animate the page

About this tutorial

jQuery is a small JavaScript library that makes common jobs short and simple: finding elements, changing them, reacting to clicks and typing, animating, and talking to the server. It is still used on millions of websites, including many built with Bootstrap and PHP.

You should know basic HTML, CSS and JavaScript first. Every lesson has examples you can run in the CodeLab Playground, an exercise and a quiz. Finish by building an interactive project and taking the final quiz.

Lessons

Getting started

  1. What is jQuery?What a JavaScript library is, adding jQuery to a page, the $ function and waiting for the page to be ready. Free 18 min
  2. Selecting elementsFind elements with CSS selectors, jQuery filters, and work on many elements at once. Free 15 min

Changing the page

  1. Changing content and attributesRead and change text, HTML, form values and attributes with text(), html(), val(), attr() and prop(). Locked 17 min
  2. CSS and classesChange styles with css() and switch looks by adding, removing and toggling classes. Locked 19 min
  3. Adding and removing elementsCreate new elements and put them in the page with append, prepend, before and after; remove them with remove and empty. Locked 17 min

Events and effects

  1. EventsReact to clicks, typing, hovering and form submits with on(), use the event object, and handle elements added later. Locked 19 min
  2. Effects and animationShow and hide elements with hide, show, fade and slide effects, and animate CSS values. Locked 17 min
  3. Traversing the pageMove from one element to related ones with parent, closest, children, find, siblings, next and each. Locked 17 min

Forms and projects

  1. Working with formsRead every kind of field, validate a form before it is sent, show messages, and serialize form data. Locked 21 min
  2. Building content from dataTurn arrays of objects into lists and cards with $.each, remember choices with localStorage, and update the page on a timer. Locked 25 min
  3. Project: a filterable course listCombine selecting, events, traversing, classes and effects into a searchable, filterable list with a favourites counter. Locked 18 min
  4. jQuery final quizFifteen questions covering the whole jQuery beginner class. Score yourself to finish the course. Locked 6 min
Hi there! đź‘‹ Have a question about the courses or joining the class? Ask me.