Two questions in javascript
Coding Project #3
Question #1: Events
Pick three graphics of your choosing … *** important … make sure they are all the same size either physically or with CSS!
Put one of the images in a HTML container with a ID called “imagebox”. Using CSS absolute positioning, put #imagebox at 0px from the left and 50px from the top.
Create two links with anchor tags called “move image” and “change image” about the imagebox
When you click the link “move image” link ….
- Make the image box move to the bottom left hand side of the screen.
- If you click “move me” again, make the imagebox move to the top right hand side of the screen
- If you click “move me” again, make the imagebox move to the bottom right hand side of the screen
- If you click “move me” again, make the three imagebox move move to the top left hand side of the screen again
- The next click should loop through the four positions again
When you click “change image” link
- The image in the image box should change based on a random number being generated.
- When you click “change image” … write code to make sure the image will change and not display the same image due to the same random number being generated.
HINT: you can approach this in a number of ways …. But at minimum I would expect you would need to use functions, events (both event handlers as well as event listeners) which would need to be added and removed at key times.
When you click “change image” … write code to make sure the image will change and not display the same image due to the same random number being generated.
Question #2: Smart Phone “Hamburger” Menu
A hamburger menu is options button typically in a top corner of a graphical user interface. It takes the form of an icon that consists of three parallel horizontal lines (displayed as ☰), suggestive of a list. The names refer to its resemblance to the layers in a “hamburger”. Selecting (tapping or clicking) this button results in a menu being revealed (sliding out or popping up), which distinguishes it from other menus.
Using the attached example as a starting point, write some jQuery to make the hamburger menu appear when clicked, and disappear when clicked again.
Your MUST use ….
- The attached HTML code and CSS supplied to setup the page;
You MUST write
- The jQuery code to make the hamburger menu appear and disappear;
- Make the hamburger menu come out from the right side rather than the left side.
HINT: You can approach this in a variety of ways, but at minimum I would expect you to use some CSS selector reference in the query, an event, and a different CSS selector reference in the function.
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


