Unlock your potential with a Pro Membership
Here is where you propel your career forward. Come join us today. Learn more.
Variables
Lab: Introduction to jQuery and JavaScript
Video Runtime: 14:42
With all programming languages, you need a way to store a value in a variable, in order to work with that value. JavaScript provides variables for you. Let’s talk about how to declare and use variables. You will use the var
variable statement to declare variables. You get to play around with changing (manipulating) the DOM to set different CSS styles to elements.
You’ll learn about:
- The difference between “declaring” and “initializing” variables
- Browser’s console retains code in memory – until you refresh
- Why does the console show “undefined?”
- Optimizing by assigning a DOM lookup to a variable
- What JavaScript does when you run a command like
jQuery('.episode-list__item')
vs. using the cached value of a variable - And you’ll set inline CSS styles using the jQuery function
.css()
Keep It Simple, Stupid (KISS) - the best kiss you'll get in code.
Episodes
Total Lab Runtime: 02:32:33
- 1 Lab Introductionfree 10:05
- 2 Document Object Model (DOM)free 08:23
- 3 Select Elements from the DOMfree 13:48
- 4 The Why of jQueryfree 04:46
- 5 Variablespro 14:42
- 6 Traverse the DOMpro 17:08
- 7 Basic Animation Effectspro 09:16
- 8 Data Typespro 15:44
- 9 Basic Eventspro 09:53
- 10 Loading Scriptspro 10:47
- 11 Declaring Functionspro 05:28
- 12 Meet the IIFEpro 09:03
- 13 jQuery's $pro 04:14
- 14 Scopepro 09:44
- 15 Cachingpro 03:34
- 16 Wrap It Uppro 05:58