jQuery—JavaScript simplified

An introductory slide deck explaining what jQuery is and how it helps us do JavaScript-y things.

Go fullscreen: ⌃⌥F

jQuery—JavaScript simplified

jQuery is JavaScript

  • Simplifies the interface to HTML
  • Provides a bunch of already made functionality
  • Not required to do HTML manipulation

jQuery is essentially just a bunch of pre-written JavaScript

It’s all money from here

Everything that is jQuery is inside the $() function

Use the $() function to select & manipulate HTML

Select & go

jQuery follows a simple order:

  1. Select something in the HTML
  2. Manipulate that HTML element

Select with CSS

jQuery (and JavaScript) use CSS selectors to grab things in the HTML document

  • ul, h1, div
  • .dino-list, .bones
  • #stego
  • main > p:first-child
  • etc.

Simplifies user interaction

Much is based on user events:

  • click, mousemove, doubleclick, etc.

jQuery makes this easy:

$('.btn').on('click', function () {
  // Do something
});
Start

jQuery—JavaScript simplified

An introductory slide deck explaining what jQuery is and how it helps us do JavaScript-y things.