Interactive Menu
JQuery’s ability to hide and show content is great for creating web pages that look simple, but reveal more information in response to user input. For this activity create a simple menu item that reveals a list of links when the user hovers over a button. Begin by adding the following content.
A menu item, a div that contains some text.
A menu, a div that contains a list of links.
Web page content, a div that contains text and or images.
Style the above content so that it looks good.
Make the menu item appear when the user’s mouse hovers over the menu item by doing the following.
Create a script.js file and add a link to in in the head of the html file.
Add a second script tag to the head of the html file with the following code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
Set the style of the menu of links div to be hidden.
Add code to the script that reveal with menu when the mouse is over the menu item (and hide the menu when the mouse is not).
Modify the menu’s style so that it doesn’t move the web page content below it when it appears. The menu should appear on top of, and obstruct, the web page content underneath it.
Optional Challenge: Fix the menu so that the use can actually click on one of the links.
Submission
Please show your completed web page and source code to the instructor.