SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
Can someone please help me with this assignment
Modify the chapter 5 example (photo viewer) to include the following features:
1. When the users click on a picture and it opens a div containing a zoomed version of the image,
add a hyperlink (button) to allow users to insert the clicked picture to a favorites list area at the
bottom of the first page (add img nodes to the DOM). BONUS (10%): Show the zoomed version
on a new window.
2. A maximum of 5 pics can be added to the favorites. After that a message is displayed to
remove at least one favorite first.
3. If the user clicks on a favorite picture, a Remove link (button/anchor) shows up next to that
picture. If the user clicks it, the pic is removed from the favorites.
4. (10% of the grade) Use good web design practices to enhance visually your html page. Add a
title, picture, copyright line, etc.
I need to modify the follow code to add the above features
HTML
Chapter 5 Case ProblemInteractive Slideshow
To view your slides:Click the Right or Left arrow buttons to move forward or backward through
the image list.Click the Play/Pause button to automatically move forward through the image
list.Click an image to view it in full screen mode.
JavaScript
"use strict";
/* JavaScript 7th Edition
Chapter 5
Chapter Case
Application to generate a slide show
Author:
Date:
Filename: js05.js
*/
window.addEventListener("load", createLightbox);
function createLightbox() {
// Lightbox Container
let lightBox = document.getElementById("lightbox");
// Parts of the lightbox
let lbTitle = document.createElement("h1");
let lbCounter = document.createElement("div");
let lbPrev = document.createElement("div");
let lbNext = document.createElement("div");
let lbPlay = document.createElement("div");
let lbImages = document.createElement("div");
// Design the lightbox title
lightBox.appendChild(lbTitle);
lbTitle.id = "lbTitle";
lbTitle.textContent = lightboxTitle;
// Design the lightbox slide counter
lightBox.appendChild(lbCounter);
lbCounter.id = "lbCounter";
let currentImg = 1;
lbCounter.textContent = currentImg + " / " + imgCount;
// Design the lightbox previous slide button
lightBox.appendChild(lbPrev);
lbPrev.id = "lbPrev";
lbPrev.innerHTML = "";
lbPrev.onclick = showPrev;
// Design the lightbox next slide button
lightBox.appendChild(lbNext);
lbNext.id = "lbNext";
lbNext.innerHTML = "";
lbNext.onclick = showNext;
// Design the lightbox Play-Pause button
lightBox.appendChild(lbPlay);
lbPlay.id = "lbPlay";
lbPlay.innerHTML = "";
let timeID;
lbPlay.onclick = function(){
if(timeID !== undefined){
// Stop the slideshow
clearInterval(timeID);
timeID = undefined;
}else{
// Start the slideshow
showNext();
timeID = setInterval(showNext, 1500);
}
}
// Design the lightbox images container
lightBox.appendChild(lbImages);
lbImages.id = "lbImages";
// Add images from the imgFiles array to the container
for (let i = 0; i < imgCount; i++) {
let image = document.createElement("img");
image.src = imgFiles[i];
image.alt = imgCaptions[i];
image.onclick = createOverlay;
lbImages.appendChild(image);
}
function showNext(){
lbImages.appendChild(lbImages.firstElementChild);
(currentImg < imgCount) ? currentImg++ : currentImg = 1;
lbCounter.textContent = currentImg + " / " + imgCount;
}
function showPrev(){
lbImages.insertBefore(lbImages.lastElementChild, lbImages.firstElementChild);
(currentImg > 1) ? currentImg-- : currentImg = imgCount;
lbCounter.textContent = currentImg + " / " + imgCount;
}
function createOverlay(){
let overlay = document.createElement("div");
overlay.id = "lbOverlay";
// Add the figure box to the overlay
let figureBox = document.createElement('figure');
overlay.appendChild(figureBox);
// Add the image to the figure box.
let overlayImage = this.cloneNode("true");
figureBox.appendChild(overlayImage);
// Add the caption to the figure box.
let overlayCaption = document.createElement('figcaption');
overlayCaption.textContent = this.alt;
figureBox.appendChild(overlayCaption);
// Add a close button to the overlay
let closeBox = document.createElement('div');
closeBox.id = "lbOverlayClose"
closeBox.innerHTML = "×";
closeBox.onclick = function(){
document.body.removeChild(overlay);
}
overlay.appendChild(closeBox);
// Append to the body of the document
document.body.appendChild(overlay);
}
}

Mais conteúdo relacionado

Semelhante a Can someone please help me with this assignmentModify the chapter .pdf

Flash cs4 tutorials_2009
Flash cs4 tutorials_2009Flash cs4 tutorials_2009
Flash cs4 tutorials_2009techbed
 
Week7 Dreamweaver Behavior & Image Hotspots
Week7 Dreamweaver Behavior & Image HotspotsWeek7 Dreamweaver Behavior & Image Hotspots
Week7 Dreamweaver Behavior & Image HotspotsRowena LI
 
flash : (as2) Membuat gallery foto sederhana
flash : (as2) Membuat gallery foto sederhanaflash : (as2) Membuat gallery foto sederhana
flash : (as2) Membuat gallery foto sederhanaSMK Negeri 6 Malang
 
SYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSanjay Saluth
 
Tips and tools for creating flipcharts
Tips and tools for creating flipchartsTips and tools for creating flipcharts
Tips and tools for creating flipchartsManuel S. Herrera
 
i need a remove button to remove the image from my favourites- however.pdf
i need a remove button to remove the image from my favourites- however.pdfi need a remove button to remove the image from my favourites- however.pdf
i need a remove button to remove the image from my favourites- however.pdfshreeaadithyaacellso
 
Tat learning applications en
Tat learning applications enTat learning applications en
Tat learning applications enToni Setyawan
 
How to embed youtube in word
How to embed youtube in wordHow to embed youtube in word
How to embed youtube in wordIlona Lantos
 
An Overview of RoboHelp 7
An Overview of RoboHelp 7An Overview of RoboHelp 7
An Overview of RoboHelp 7Scott Abel
 
Flash, actionscript 2 : preloader for loader component.docx
Flash, actionscript 2 : preloader for loader component.docxFlash, actionscript 2 : preloader for loader component.docx
Flash, actionscript 2 : preloader for loader component.docxSMK Negeri 6 Malang
 
Uploading Batch Images
Uploading Batch ImagesUploading Batch Images
Uploading Batch Imagesdcp3450
 
Web page manual
Web page manualWeb page manual
Web page manualkyffa
 
Embedding, Inserting and Linking on Wikispaces
Embedding, Inserting and Linking on WikispacesEmbedding, Inserting and Linking on Wikispaces
Embedding, Inserting and Linking on WikispacesJess McCulloch
 
Microsoft PowerPoint features
Microsoft PowerPoint featuresMicrosoft PowerPoint features
Microsoft PowerPoint featuresSaira Randhawa
 
Keynote + Next Gen UIs.pptx
Keynote + Next Gen UIs.pptxKeynote + Next Gen UIs.pptx
Keynote + Next Gen UIs.pptxEqraKhattak
 
Web Design - Lesson 3
Web Design - Lesson 3Web Design - Lesson 3
Web Design - Lesson 3Jamie Hutt
 
Web components - a whirlwind tour
Web components - a whirlwind tourWeb components - a whirlwind tour
Web components - a whirlwind tourMartin Naumann
 

Semelhante a Can someone please help me with this assignmentModify the chapter .pdf (20)

Flash cs4 tutorials_2009
Flash cs4 tutorials_2009Flash cs4 tutorials_2009
Flash cs4 tutorials_2009
 
Week7 Dreamweaver Behavior & Image Hotspots
Week7 Dreamweaver Behavior & Image HotspotsWeek7 Dreamweaver Behavior & Image Hotspots
Week7 Dreamweaver Behavior & Image Hotspots
 
flash : (as2) Membuat gallery foto sederhana
flash : (as2) Membuat gallery foto sederhanaflash : (as2) Membuat gallery foto sederhana
flash : (as2) Membuat gallery foto sederhana
 
SYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECT
 
Tips and tools for creating flipcharts
Tips and tools for creating flipchartsTips and tools for creating flipcharts
Tips and tools for creating flipcharts
 
i need a remove button to remove the image from my favourites- however.pdf
i need a remove button to remove the image from my favourites- however.pdfi need a remove button to remove the image from my favourites- however.pdf
i need a remove button to remove the image from my favourites- however.pdf
 
Tat learning applications en
Tat learning applications enTat learning applications en
Tat learning applications en
 
How to embed youtube in word
How to embed youtube in wordHow to embed youtube in word
How to embed youtube in word
 
An Overview of RoboHelp 7
An Overview of RoboHelp 7An Overview of RoboHelp 7
An Overview of RoboHelp 7
 
Flash, actionscript 2 : preloader for loader component.docx
Flash, actionscript 2 : preloader for loader component.docxFlash, actionscript 2 : preloader for loader component.docx
Flash, actionscript 2 : preloader for loader component.docx
 
Uploading Batch Images
Uploading Batch ImagesUploading Batch Images
Uploading Batch Images
 
Introduction to computing
Introduction to computingIntroduction to computing
Introduction to computing
 
Digital Storytelling
Digital StorytellingDigital Storytelling
Digital Storytelling
 
Web page manual
Web page manualWeb page manual
Web page manual
 
Embedding, Inserting and Linking on Wikispaces
Embedding, Inserting and Linking on WikispacesEmbedding, Inserting and Linking on Wikispaces
Embedding, Inserting and Linking on Wikispaces
 
Microsoft PowerPoint features
Microsoft PowerPoint featuresMicrosoft PowerPoint features
Microsoft PowerPoint features
 
Keynote + Next Gen UIs.pptx
Keynote + Next Gen UIs.pptxKeynote + Next Gen UIs.pptx
Keynote + Next Gen UIs.pptx
 
Web Design - Lesson 3
Web Design - Lesson 3Web Design - Lesson 3
Web Design - Lesson 3
 
Revolver
RevolverRevolver
Revolver
 
Web components - a whirlwind tour
Web components - a whirlwind tourWeb components - a whirlwind tour
Web components - a whirlwind tour
 

Mais de sales88

Caso de empresa Hamburguesa In-N-Out el valor del cliente a la an.pdf
Caso de empresa Hamburguesa In-N-Out el valor del cliente a la an.pdfCaso de empresa Hamburguesa In-N-Out el valor del cliente a la an.pdf
Caso de empresa Hamburguesa In-N-Out el valor del cliente a la an.pdfsales88
 
CASO 6.2 Algunos ciudadanos preocupados hicieron una cita para reu.pdf
CASO 6.2 Algunos ciudadanos preocupados hicieron una cita para reu.pdfCASO 6.2 Algunos ciudadanos preocupados hicieron una cita para reu.pdf
CASO 6.2 Algunos ciudadanos preocupados hicieron una cita para reu.pdfsales88
 
Caso de EstudioLiderazgo y Gesti�nLaura es directora asocia.pdf
Caso de EstudioLiderazgo y Gesti�nLaura es directora asocia.pdfCaso de EstudioLiderazgo y Gesti�nLaura es directora asocia.pdf
Caso de EstudioLiderazgo y Gesti�nLaura es directora asocia.pdfsales88
 
Caso de estudio Hacer que las alianzas estrat�gicas y las redes f.pdf
Caso de estudio Hacer que las alianzas estrat�gicas y las redes f.pdfCaso de estudio Hacer que las alianzas estrat�gicas y las redes f.pdf
Caso de estudio Hacer que las alianzas estrat�gicas y las redes f.pdfsales88
 
CASO DE ESTUDIO La cl�nica Mayo es uno de los nombres m�s respetad.pdf
CASO DE ESTUDIO La cl�nica Mayo es uno de los nombres m�s respetad.pdfCASO DE ESTUDIO La cl�nica Mayo es uno de los nombres m�s respetad.pdf
CASO DE ESTUDIO La cl�nica Mayo es uno de los nombres m�s respetad.pdfsales88
 
CASO DE ESTUDIO La �pera de Sydney es uno de los edificios ic�nico.pdf
CASO DE ESTUDIO La �pera de Sydney es uno de los edificios ic�nico.pdfCASO DE ESTUDIO La �pera de Sydney es uno de los edificios ic�nico.pdf
CASO DE ESTUDIO La �pera de Sydney es uno de los edificios ic�nico.pdfsales88
 
Caso de estudio Despu�s de luchar con la deuda y la fuerte compete.pdf
Caso de estudio Despu�s de luchar con la deuda y la fuerte compete.pdfCaso de estudio Despu�s de luchar con la deuda y la fuerte compete.pdf
Caso de estudio Despu�s de luchar con la deuda y la fuerte compete.pdfsales88
 
Caso cl�nicoSDRAPregunta 1.Dados sus s�ntomas de fatiga, disne.pdf
Caso cl�nicoSDRAPregunta 1.Dados sus s�ntomas de fatiga, disne.pdfCaso cl�nicoSDRAPregunta 1.Dados sus s�ntomas de fatiga, disne.pdf
Caso cl�nicoSDRAPregunta 1.Dados sus s�ntomas de fatiga, disne.pdfsales88
 
Caso 21-3 Orden de prueba de deterioro Five Star Hotel Corporati.pdf
Caso 21-3 Orden de prueba de deterioro Five Star Hotel Corporati.pdfCaso 21-3 Orden de prueba de deterioro Five Star Hotel Corporati.pdf
Caso 21-3 Orden de prueba de deterioro Five Star Hotel Corporati.pdfsales88
 
Caso 6.2 Seguro Mar�timo Cl�usula Inchmaree Un barco pesquero c.pdf
Caso 6.2 Seguro Mar�timo Cl�usula Inchmaree Un barco pesquero c.pdfCaso 6.2 Seguro Mar�timo Cl�usula Inchmaree Un barco pesquero c.pdf
Caso 6.2 Seguro Mar�timo Cl�usula Inchmaree Un barco pesquero c.pdfsales88
 
Caso 3.1 Firma de contadores Moss y McAdams Bruce Palmer hab�a t.pdf
Caso 3.1 Firma de contadores Moss y McAdams Bruce Palmer hab�a t.pdfCaso 3.1 Firma de contadores Moss y McAdams Bruce Palmer hab�a t.pdf
Caso 3.1 Firma de contadores Moss y McAdams Bruce Palmer hab�a t.pdfsales88
 
Caso 2 (TV de Alta Definici�n La Gran Alianza) (1) Seg�n el caso .pdf
Caso 2 (TV de Alta Definici�n La Gran Alianza) (1) Seg�n el caso .pdfCaso 2 (TV de Alta Definici�n La Gran Alianza) (1) Seg�n el caso .pdf
Caso 2 (TV de Alta Definici�n La Gran Alianza) (1) Seg�n el caso .pdfsales88
 
Caso 1 (8 puntos) Miguel y Cinthia Leatch viven en Covington, Ten.pdf
Caso 1 (8 puntos) Miguel y Cinthia Leatch viven en Covington, Ten.pdfCaso 1 (8 puntos) Miguel y Cinthia Leatch viven en Covington, Ten.pdf
Caso 1 (8 puntos) Miguel y Cinthia Leatch viven en Covington, Ten.pdfsales88
 
Caso 1 Agmmaglobulinemia ligada al X 1. Bill fue testamento duran.pdf
Caso 1 Agmmaglobulinemia ligada al X 1. Bill fue testamento duran.pdfCaso 1 Agmmaglobulinemia ligada al X 1. Bill fue testamento duran.pdf
Caso 1 Agmmaglobulinemia ligada al X 1. Bill fue testamento duran.pdfsales88
 
Caso 1 Felipe R�os y Tiffany De Los Rios married filling jointl.pdf
Caso 1 Felipe R�os  y Tiffany De Los Rios married filling jointl.pdfCaso 1 Felipe R�os  y Tiffany De Los Rios married filling jointl.pdf
Caso 1 Felipe R�os y Tiffany De Los Rios married filling jointl.pdfsales88
 
Case studyData Protect and PrivacyHuman beings value their priva.pdf
Case studyData Protect and PrivacyHuman beings value their priva.pdfCase studyData Protect and PrivacyHuman beings value their priva.pdf
Case studyData Protect and PrivacyHuman beings value their priva.pdfsales88
 
CASE STUDY [30 Marks] Former Tongaat Hulett bosses in court for frau.pdf
CASE STUDY [30 Marks] Former Tongaat Hulett bosses in court for frau.pdfCASE STUDY [30 Marks] Former Tongaat Hulett bosses in court for frau.pdf
CASE STUDY [30 Marks] Former Tongaat Hulett bosses in court for frau.pdfsales88
 
case study Private Practice Implements Safeguards for Waiting .pdf
case study Private Practice Implements Safeguards for Waiting .pdfcase study Private Practice Implements Safeguards for Waiting .pdf
case study Private Practice Implements Safeguards for Waiting .pdfsales88
 
Case Study Liberty and the Elderly Patient Ronald is 71 years old..pdf
Case Study Liberty and the Elderly Patient Ronald is 71 years old..pdfCase Study Liberty and the Elderly Patient Ronald is 71 years old..pdf
Case Study Liberty and the Elderly Patient Ronald is 71 years old..pdfsales88
 
Case Study AMr. P tripped and broke her left hip while attempting.pdf
Case Study AMr. P tripped and broke her left hip while attempting.pdfCase Study AMr. P tripped and broke her left hip while attempting.pdf
Case Study AMr. P tripped and broke her left hip while attempting.pdfsales88
 

Mais de sales88 (20)

Caso de empresa Hamburguesa In-N-Out el valor del cliente a la an.pdf
Caso de empresa Hamburguesa In-N-Out el valor del cliente a la an.pdfCaso de empresa Hamburguesa In-N-Out el valor del cliente a la an.pdf
Caso de empresa Hamburguesa In-N-Out el valor del cliente a la an.pdf
 
CASO 6.2 Algunos ciudadanos preocupados hicieron una cita para reu.pdf
CASO 6.2 Algunos ciudadanos preocupados hicieron una cita para reu.pdfCASO 6.2 Algunos ciudadanos preocupados hicieron una cita para reu.pdf
CASO 6.2 Algunos ciudadanos preocupados hicieron una cita para reu.pdf
 
Caso de EstudioLiderazgo y Gesti�nLaura es directora asocia.pdf
Caso de EstudioLiderazgo y Gesti�nLaura es directora asocia.pdfCaso de EstudioLiderazgo y Gesti�nLaura es directora asocia.pdf
Caso de EstudioLiderazgo y Gesti�nLaura es directora asocia.pdf
 
Caso de estudio Hacer que las alianzas estrat�gicas y las redes f.pdf
Caso de estudio Hacer que las alianzas estrat�gicas y las redes f.pdfCaso de estudio Hacer que las alianzas estrat�gicas y las redes f.pdf
Caso de estudio Hacer que las alianzas estrat�gicas y las redes f.pdf
 
CASO DE ESTUDIO La cl�nica Mayo es uno de los nombres m�s respetad.pdf
CASO DE ESTUDIO La cl�nica Mayo es uno de los nombres m�s respetad.pdfCASO DE ESTUDIO La cl�nica Mayo es uno de los nombres m�s respetad.pdf
CASO DE ESTUDIO La cl�nica Mayo es uno de los nombres m�s respetad.pdf
 
CASO DE ESTUDIO La �pera de Sydney es uno de los edificios ic�nico.pdf
CASO DE ESTUDIO La �pera de Sydney es uno de los edificios ic�nico.pdfCASO DE ESTUDIO La �pera de Sydney es uno de los edificios ic�nico.pdf
CASO DE ESTUDIO La �pera de Sydney es uno de los edificios ic�nico.pdf
 
Caso de estudio Despu�s de luchar con la deuda y la fuerte compete.pdf
Caso de estudio Despu�s de luchar con la deuda y la fuerte compete.pdfCaso de estudio Despu�s de luchar con la deuda y la fuerte compete.pdf
Caso de estudio Despu�s de luchar con la deuda y la fuerte compete.pdf
 
Caso cl�nicoSDRAPregunta 1.Dados sus s�ntomas de fatiga, disne.pdf
Caso cl�nicoSDRAPregunta 1.Dados sus s�ntomas de fatiga, disne.pdfCaso cl�nicoSDRAPregunta 1.Dados sus s�ntomas de fatiga, disne.pdf
Caso cl�nicoSDRAPregunta 1.Dados sus s�ntomas de fatiga, disne.pdf
 
Caso 21-3 Orden de prueba de deterioro Five Star Hotel Corporati.pdf
Caso 21-3 Orden de prueba de deterioro Five Star Hotel Corporati.pdfCaso 21-3 Orden de prueba de deterioro Five Star Hotel Corporati.pdf
Caso 21-3 Orden de prueba de deterioro Five Star Hotel Corporati.pdf
 
Caso 6.2 Seguro Mar�timo Cl�usula Inchmaree Un barco pesquero c.pdf
Caso 6.2 Seguro Mar�timo Cl�usula Inchmaree Un barco pesquero c.pdfCaso 6.2 Seguro Mar�timo Cl�usula Inchmaree Un barco pesquero c.pdf
Caso 6.2 Seguro Mar�timo Cl�usula Inchmaree Un barco pesquero c.pdf
 
Caso 3.1 Firma de contadores Moss y McAdams Bruce Palmer hab�a t.pdf
Caso 3.1 Firma de contadores Moss y McAdams Bruce Palmer hab�a t.pdfCaso 3.1 Firma de contadores Moss y McAdams Bruce Palmer hab�a t.pdf
Caso 3.1 Firma de contadores Moss y McAdams Bruce Palmer hab�a t.pdf
 
Caso 2 (TV de Alta Definici�n La Gran Alianza) (1) Seg�n el caso .pdf
Caso 2 (TV de Alta Definici�n La Gran Alianza) (1) Seg�n el caso .pdfCaso 2 (TV de Alta Definici�n La Gran Alianza) (1) Seg�n el caso .pdf
Caso 2 (TV de Alta Definici�n La Gran Alianza) (1) Seg�n el caso .pdf
 
Caso 1 (8 puntos) Miguel y Cinthia Leatch viven en Covington, Ten.pdf
Caso 1 (8 puntos) Miguel y Cinthia Leatch viven en Covington, Ten.pdfCaso 1 (8 puntos) Miguel y Cinthia Leatch viven en Covington, Ten.pdf
Caso 1 (8 puntos) Miguel y Cinthia Leatch viven en Covington, Ten.pdf
 
Caso 1 Agmmaglobulinemia ligada al X 1. Bill fue testamento duran.pdf
Caso 1 Agmmaglobulinemia ligada al X 1. Bill fue testamento duran.pdfCaso 1 Agmmaglobulinemia ligada al X 1. Bill fue testamento duran.pdf
Caso 1 Agmmaglobulinemia ligada al X 1. Bill fue testamento duran.pdf
 
Caso 1 Felipe R�os y Tiffany De Los Rios married filling jointl.pdf
Caso 1 Felipe R�os  y Tiffany De Los Rios married filling jointl.pdfCaso 1 Felipe R�os  y Tiffany De Los Rios married filling jointl.pdf
Caso 1 Felipe R�os y Tiffany De Los Rios married filling jointl.pdf
 
Case studyData Protect and PrivacyHuman beings value their priva.pdf
Case studyData Protect and PrivacyHuman beings value their priva.pdfCase studyData Protect and PrivacyHuman beings value their priva.pdf
Case studyData Protect and PrivacyHuman beings value their priva.pdf
 
CASE STUDY [30 Marks] Former Tongaat Hulett bosses in court for frau.pdf
CASE STUDY [30 Marks] Former Tongaat Hulett bosses in court for frau.pdfCASE STUDY [30 Marks] Former Tongaat Hulett bosses in court for frau.pdf
CASE STUDY [30 Marks] Former Tongaat Hulett bosses in court for frau.pdf
 
case study Private Practice Implements Safeguards for Waiting .pdf
case study Private Practice Implements Safeguards for Waiting .pdfcase study Private Practice Implements Safeguards for Waiting .pdf
case study Private Practice Implements Safeguards for Waiting .pdf
 
Case Study Liberty and the Elderly Patient Ronald is 71 years old..pdf
Case Study Liberty and the Elderly Patient Ronald is 71 years old..pdfCase Study Liberty and the Elderly Patient Ronald is 71 years old..pdf
Case Study Liberty and the Elderly Patient Ronald is 71 years old..pdf
 
Case Study AMr. P tripped and broke her left hip while attempting.pdf
Case Study AMr. P tripped and broke her left hip while attempting.pdfCase Study AMr. P tripped and broke her left hip while attempting.pdf
Case Study AMr. P tripped and broke her left hip while attempting.pdf
 

Último

Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 

Último (20)

Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 

Can someone please help me with this assignmentModify the chapter .pdf

  • 1. Can someone please help me with this assignment Modify the chapter 5 example (photo viewer) to include the following features: 1. When the users click on a picture and it opens a div containing a zoomed version of the image, add a hyperlink (button) to allow users to insert the clicked picture to a favorites list area at the bottom of the first page (add img nodes to the DOM). BONUS (10%): Show the zoomed version on a new window. 2. A maximum of 5 pics can be added to the favorites. After that a message is displayed to remove at least one favorite first. 3. If the user clicks on a favorite picture, a Remove link (button/anchor) shows up next to that picture. If the user clicks it, the pic is removed from the favorites. 4. (10% of the grade) Use good web design practices to enhance visually your html page. Add a title, picture, copyright line, etc. I need to modify the follow code to add the above features HTML Chapter 5 Case ProblemInteractive Slideshow To view your slides:Click the Right or Left arrow buttons to move forward or backward through the image list.Click the Play/Pause button to automatically move forward through the image list.Click an image to view it in full screen mode. JavaScript "use strict"; /* JavaScript 7th Edition Chapter 5 Chapter Case Application to generate a slide show Author: Date: Filename: js05.js */ window.addEventListener("load", createLightbox); function createLightbox() {
  • 2. // Lightbox Container let lightBox = document.getElementById("lightbox"); // Parts of the lightbox let lbTitle = document.createElement("h1"); let lbCounter = document.createElement("div"); let lbPrev = document.createElement("div"); let lbNext = document.createElement("div"); let lbPlay = document.createElement("div"); let lbImages = document.createElement("div"); // Design the lightbox title lightBox.appendChild(lbTitle); lbTitle.id = "lbTitle"; lbTitle.textContent = lightboxTitle; // Design the lightbox slide counter lightBox.appendChild(lbCounter); lbCounter.id = "lbCounter"; let currentImg = 1; lbCounter.textContent = currentImg + " / " + imgCount; // Design the lightbox previous slide button lightBox.appendChild(lbPrev); lbPrev.id = "lbPrev"; lbPrev.innerHTML = ""; lbPrev.onclick = showPrev; // Design the lightbox next slide button lightBox.appendChild(lbNext); lbNext.id = "lbNext"; lbNext.innerHTML = ""; lbNext.onclick = showNext; // Design the lightbox Play-Pause button lightBox.appendChild(lbPlay);
  • 3. lbPlay.id = "lbPlay"; lbPlay.innerHTML = ""; let timeID; lbPlay.onclick = function(){ if(timeID !== undefined){ // Stop the slideshow clearInterval(timeID); timeID = undefined; }else{ // Start the slideshow showNext(); timeID = setInterval(showNext, 1500); } } // Design the lightbox images container lightBox.appendChild(lbImages); lbImages.id = "lbImages"; // Add images from the imgFiles array to the container for (let i = 0; i < imgCount; i++) { let image = document.createElement("img"); image.src = imgFiles[i]; image.alt = imgCaptions[i]; image.onclick = createOverlay; lbImages.appendChild(image); } function showNext(){ lbImages.appendChild(lbImages.firstElementChild); (currentImg < imgCount) ? currentImg++ : currentImg = 1; lbCounter.textContent = currentImg + " / " + imgCount; } function showPrev(){ lbImages.insertBefore(lbImages.lastElementChild, lbImages.firstElementChild); (currentImg > 1) ? currentImg-- : currentImg = imgCount;
  • 4. lbCounter.textContent = currentImg + " / " + imgCount; } function createOverlay(){ let overlay = document.createElement("div"); overlay.id = "lbOverlay"; // Add the figure box to the overlay let figureBox = document.createElement('figure'); overlay.appendChild(figureBox); // Add the image to the figure box. let overlayImage = this.cloneNode("true"); figureBox.appendChild(overlayImage); // Add the caption to the figure box. let overlayCaption = document.createElement('figcaption'); overlayCaption.textContent = this.alt; figureBox.appendChild(overlayCaption); // Add a close button to the overlay let closeBox = document.createElement('div'); closeBox.id = "lbOverlayClose" closeBox.innerHTML = "×"; closeBox.onclick = function(){ document.body.removeChild(overlay); } overlay.appendChild(closeBox); // Append to the body of the document document.body.appendChild(overlay); } }