hands on javascript and html
Description

Having Trouble Meeting Your Deadline?
Get your assignment on hands on javascript and html completed on time. avoid delay and – ORDER NOW
Use your code editor to open the project05-02_txt.html and project05-02_txt.js files from the js05 ? project02 folder. Enter your name and the date in the comment section of each file and save them as project05-02.html and project05-02.js, respectively.
Go to the project05-02.html file in your code editor and in the head section add a script element to load the project05-02.js file, deferring the app until the page is loaded. Review the contents and structure of the web document and then close the file, saving your changes.
- Return to the project05-02.js file in your code editor. Below the initial comment section declare the following variables:
The images variable containing an HTML collection of all elements with the tag name “img”.
The photoBucket variable referencing the element with the id “photo_bucket”.
The photoList variable referencing the element with the id “photo_list”.
Create a for loop that iterates through all of the items in the images collection.
- Within the for loop insert an onclick event handler that runs an anonymous function when an image is clicked.
When an image is clicked it is either moved from the photo bucket to the photo list or from the photo list back to the photo bucket. To determine which action to perform, add the following if else statement to the anonymous function:
If the parent element of the clicked image has an id equal to “photo_bucket” then do the following:
- Create an element node named newItem for the li element,
append newItem to the photoList object, and
append the image to the newItem object using the appendChild() method.
- Note: Use the this object to reference the image that was clicked by the user.
Otherwise, do the following:
Declare a variable named oldItem equal to the parent element of the clicked image,
append the clicked image to photoBucket object, and
- remove oldItem from the parent element of oldItem using the removeChild() method.
Save your changes to the file and then load project05-02.html in your web browser.
Verify that you can move items between the photo bucket and the photo list by clicking the image within either location.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Order Now and we will direct you to our Order Page at Litessays. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
