jQuery

Class Monday, May 20, 2019

 Today’s goals:

  • Finish jQuery events practice page
  • Explore the differences between jQuery and JavaScript: selecting and interacting with elements on a webpage
  • Review services that will create websites or apps for you without coding

 Today’s featured sites:

 jQuery Events

  1. Like JavaScript, jQuery can do things to the content on your page when someone scrolls, clicks, hovers the mouse, etc.
  2. First, let’s review jQuery syntax
  3. Let’s also review jQuery selectors; pay special attention to $(this)
  4. Now let’s look at jQuery events
  5. More practice code: download this code , copy and paste it into Notepad++, and save it as jqueryevents.html
  6. Let’s follow the instructions inside the comments
  7. Code check: Download here  to compare with your own for trouble-shooting

 jQuery vs JavaScript

  1. jQuery is a JavaScript library that makes doing things with JavaScript easier
  2. How do we write “regular” JavaScript when we create a webpage? What tag do we have to use with our JavaScript code?
  3. What important step do we have to take to add jQuery to our webpage before we can use it?
  4. jQuery vs JavaScript demo page: https://codepen.io/allison02155/pen/arLOjx
    Let’s go here, review the examples and code, and answer the questions
  5. Let’s write a function in jQuery to make everything on the page fade out after 5 seconds when we scroll. How do we begin? Look at the practice page we finished today.

 Code-free applications