Skip to content

Latest commit

 

History

History
 
 

w2_d1_1_DOM_and_jQuery

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

#DOM & jQuery

Objectives
Use the JS library "jQuery" to select and manipulate DOM elements.
Describe an explain the importance and risks of using external libraries to accelerate coding.
Pair program.

#BUT FIRST!

Read this Comparison of jQuery and Vanilla JS (5 min)

Motivation (Why?)

jQuery is a very, very popular client-side library. It greatly simplifies:

  • Interacting with the DOM (selecting, changing)
  • Submitting forms
  • Receiving and sending data to APIs (AJAX)

Analogy (What?)

External libraries or modules like jQuery are like:

  • Shortcuts
  • Standing on the shoulders of giants
  • Letters, Syllables, Words, Phrases, Sentences, Paragraphs, Books

Pair Programming

  • Industry standard.
  • Fluid switching between driver and navigator.
  • Navigator gives directions.
  • Driver narrates what they are doing.
  • If unequal, driver should be learning, navigator instructing.
  • Hint: Make and write down a plan in english of what you're going to accomplish and the steps.

Challenges

Docs & Resources

jQuery API jQuery Examples

Basic Challenges

  1. Add jQuery to your tic-tac-toe app
  2. Refactor your JS to use jQuery in your tic-tac-toe app

Stretch Challenges

  1. Pull up your portfolio project from last week and refactor the Vanilla JS you used to use jQuery