#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)
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)
External libraries or modules like jQuery are like:
- Shortcuts
- Standing on the shoulders of giants
- Letters, Syllables, Words, Phrases, Sentences, Paragraphs, Books
- 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.
- Add jQuery to your tic-tac-toe app
- Refactor your JS to use jQuery in your tic-tac-toe app
- Pull up your portfolio project from last week and refactor the Vanilla JS you used to use jQuery