Coder Social home page Coder Social logo

jquerylotr's Introduction

jQuery Lord of the Rings

We are going to take a trip from the Shire, through Rivendell, across Middle Earth, and into the heart of Mordor itself, Mount Doom. Pack up, because we're going on an adventure.

Learning Objectives

  • Practice using jQuery to manipulate the DOM

Prerequisites

  • jQuery
  • JavaScript
  • HTML DOM

Getting Started

  1. You will be writing your answers inside the fellowship.js file located in tonight's homework/lotr/scripts/ folder

  2. While you're working, make sure to open the index.html file in your browser to test your work. It is located at: homework/lotr/index.html

Resources

  1. Inside the folder lotr folder are an index.html file and an a style.css sheet that will add some structure and style to your homework.
  2. You will be coding in the fellowship.js file.
  3. You will be doing a tiny bit of work in the CSS file once you get to Chapter 9.
  4. You should not touch the HTML file.

Directions

  1. Open the fellowship.js file in your text editor.
  2. Observe the arrays of people and places and the 13 chapters that have been included.
  3. Note that each chapter has a button in your browser with a click handler attached in the html file, and an associated javascript function in app.js.
  4. Your job is to fill in the code inside the JS functions to get the application working as intended.

๐Ÿ˜ Remember that you can check your DOM tree in the Elements tab in the Chrome Console.

Workflow

Tackle tonight's homework one function at a time in order from start to finish.

  1. When you begin, write a console.log inside of the function that you are working on to check that the event listener works when you click the associated button.

  2. Write the correct DOM manipulatory code inside the function and check that it works.

NOTE: Each function depends on the previous ones, so make sure your function works before moving on to the next one!

  1. Every time you refresh the browser, you will have to click the buttons one by one in order from the beginning to operate your application. (If really don't want the popups after you've completed a step, you can check to disable each popup and speed up the process of debugging).

Commits

Commit your work after each function is complete and working properly


Need a jQuery Reminder?

If you need help remember all of the jQuery DOM commands, check out the jQuery Cheatsheet

Did I Do It Right?

Provided below are just some screenshots showing you what your index.html should look like for some of the early chapters so you can be sure you're on the right track!

Make Middle Earth
Make Hobbits
Frodo has the ring
Baddies Added to Mordor
Buddies Added
Leave the Shire

Deliverables

  1. All your work in the fellowship.js file

Technical Requirements

Your JavaScript files MUST run without syntax errors. If there are errors you can't solve, comment them out and leave a comment above explaining what is wrong.


Copyright 2018, General Assembly Space. Licensed under CC-BY-NC-SA, 4.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.