Skip to content

dechmann/jquery-moonflowers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Moonflower's Coffee Menu

Completing this assignment depends on knowing:

  • basic JavaScript to create variables, arrays, if/else statements and for loops
  • how to use a CDN to include jQuery in your page
  • jQuery methods for selecting and navigating the DOM Tree
  • jQuery methods for adding and removing attributes
  • jQuery methods for creating a new element and appending it to the DOM

GitHub Repository

https://github.com/htc-ccis2591/jquery-moonflowers

You’ll want to begin each assignment by forking the repository and cloning it locally. When you are done, you’ll push to GitHub and submit a pull request.

Moonflower’s Coffee Shop

Open the web page in a browser. You’ll see that it loads a page with an image for each item on the menu.
In the spirit of progressive enhancement, the page may not be amazingly beautiful, but all the info is visible without any JavaScript.

For this assignment, you will transform the page with JavaScript & jQuery, altering the DOM so that when the page loads, all images are hidden. Add text under the “Menu” heading to indicate that you can click on an item to see an image. Then when an item is clicked, such as the Cappuccino or the Latte, the corresponding image should show off to the side.

If you look at the HTML provided, you’ll see an image tag in the aside. This is the image that displays on the right side. You can show one of the menu item images by filling in the appropriate value for the src attribute. That value comes from the corresponding “hidden” image in the menu list.

All of this magic is done by adding a few click handlers and by adding and removing attribute values.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 67.9%
  • CSS 20.3%
  • JavaScript 11.8%