Description
You will find the files on your server account in the hw1 folder. If you already had a hw1 folder
when these files were copied to your account, you will probably find them in a new hw1 folder
inside your hw1 folder. You may copy these files and work on your local computer but there is
only one file you should copy back to the server.
There is only one (1) file you will edit, it is main.js. All imports for jQuery and other JS files have
already been made. You are not to make any changes to any other files. Within main.js there
are a series of jQuery event listeners that listen to the corresponding DOM elements for each
question. The body of these event listeners are empty. Note that inside of each one there is a //
START Qx and // END Qx comment. You are to write all your solutions within these comments.
You may not edit/write additional global variables or functions outside of the the scope of these
comments. This assignment can be done without such additions.
You are encouraged to use jQuery/built in JavaScript methods as necessary to complete the
assignment. No other external libraries are allowed. You are also encouraged to debug your
work using console.log(). You may not edit index.html, but can look at it in either the assignment
files or inside the web inspector.
For questions 4 and 5, you will need to make an ajax call to a local resource, pokemon.json. At
the top of main.js you will find an example of that ajax call outputting the contents of the file
using a pokemon object and jQuery. You should read these few lines and understand how
they work before answering questions 4 and 5. Yo u can use this in your solutions to 4 and 5.
Do not edit the original ajax call near the top of the file. Though there are not any PHP files in
this assignment, you must run it on a server (local on your computer or on the course server)
since there is an ajax call to a resource.
Each question has specific details on what your solution should do as a JavaScript comment.
Be sure to follow those carefully.
Questions/concerns can be posted on Piazza. If your question involves posting code that is a
potential solution to any of the questions, make the Piazza post private to instructors.
Submission
When you are ready for grading you must do two things.
● Make sure main.js in your server account hw1/scripts/main.js is the file you want graded.
If you developed on your local computer, make sure everything works on the server.
● Upload a file called ready.pdf to CMS. This is the only way that TAs know that you are
ready for grading and not planning to turn in the assignment late. That file should at
least contain a statement that you are ready for grading but may contain anything else
you would like the TA reviewing your assignment to know.