SlideShare a Scribd company logo
1 of 4
Download to read offline
a3.html code
Plaid Scarf Selector Plaid Scarf Selector
Feels close to real cashmere (but costs a lot less).
Think of this scarf as the next best thing to wearing authentic cashmere.
Its microsueded fabric really is that soft. In fact, at first touch some
mistake if for the real deal. Thats quite a compliment.
Rose Mauve
a3.js code
//FUNCTIONS
const $ = function (id) {
return document.getElementById(id);
}
let centerImage = null;
/****Add mouse function here for rollover effect on
the center image****/
const swap = function(evt){
//a.GET CLICKED LINK
const a = this;
//b.GET CAPTION
const caption = $("caption");
//console.log(centerImage);
//console.log(a.getAttribute("href"));
//console.log(a.getAttribute("id"));
//c.CHANGE ENLARGED IMAGE'S SRC/ID TO CLICKED LINK
centerImage.setAttribute("src", a.getAttribute("href"));
//----------------------------------------------------------------
/**You have to enable and edit the following line of code to
make the program work correctly. What do you have to edit?**/
centerImage.setAttribute("id", a.getAttribute("id"));
//----------------------------------------------------------------
//d.CHANGE THE CAPTION TO CLICKED LINK'S TITLE
caption.firstChild.nodeValue = a.getAttribute("title");
//e.CANCEL DEFAULT ACTION OF EVENT
evt.preventDefault();
}
//ONLOAD EVENT HANDLER
window.onload = function () {
//GET ALL LINKS
const listNode = $("image_list");
const aElements = listNode.getElementsByTagName("a");
//GET THE ENLARGED IMAGE ELEMENT
centerImage = $("images/roseMauve2.jpg");
//PROCESS EACH IMAGE LINK
let imageLink = null;
for ( let i = 0; i < aElements.length; i++ ) {
//1. GET LINK
imageLink = aElements[i];
//2. PRELOAD THE IMAGES THAT WILL APPEAR IN THE CENTER
//AND THE ROLLOVER IMAGES
const image = new Image();
image.setAttribute("src",imageLink.getAttribute("href"));
image.setAttribute("id",imageLink.getAttribute("id"));
//3. ATTACH ALL EVENT HANDLERS TO APPROPRIATE FUNCTIONS
imageLink.onclick = swap;
}//end for loop
}//end onload
a3.css code
/* type selectors */
article, aside, figure, figcaption, footer, header, nav, section {
display: block;
}
body {
font-family: Arial, Helvetica, sans-serif;
margin: 0 auto;
padding: 20px;
width: 550px;
border: 3px solid blue;
}
h1, h2, ul, p {
margin: 0;
padding: 0;
}
h1 {
padding-bottom: .25em;
}
h2 {
font-size: 120%;
padding: .5em 0 .25em;
}
li {
padding-right: 10px;
display: inline;
}
Scarf images
black1.jpg
black2.jpg
harborBlue1.jpg
harborBlue2.jpg
red1.jpg
red2.jpg
roseMauve1. jpg
roseMauve2.jpg
Scarf thumbnails
black.jpg
harborBlue.jpg
red.jpg
roseMauve.jpg

More Related Content

Similar to a3.html code!DOCTYPE HTMLhtml lang=enhead meta c.pdf

前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
Ting Lv
 
Begin three.js.key
Begin three.js.keyBegin three.js.key
Begin three.js.key
Yi-Fan Liao
 
Droidcon2013 android experience lahoda
Droidcon2013 android experience lahodaDroidcon2013 android experience lahoda
Droidcon2013 android experience lahoda
Droidcon Berlin
 

Similar to a3.html code!DOCTYPE HTMLhtml lang=enhead meta c.pdf (20)

Symfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologySymfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technology
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven Development
 
Writing JavaScript that doesn't suck
Writing JavaScript that doesn't suckWriting JavaScript that doesn't suck
Writing JavaScript that doesn't suck
 
Different types of sticker apps
Different types of sticker appsDifferent types of sticker apps
Different types of sticker apps
 
Writing Maintainable JavaScript
Writing Maintainable JavaScriptWriting Maintainable JavaScript
Writing Maintainable JavaScript
 
Cycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveCycle.js: Functional and Reactive
Cycle.js: Functional and Reactive
 
The Theory Of The Dom
The Theory Of The DomThe Theory Of The Dom
The Theory Of The Dom
 
Backbone Basics with Examples
Backbone Basics with ExamplesBackbone Basics with Examples
Backbone Basics with Examples
 
Jquery optimization-tips
Jquery optimization-tipsJquery optimization-tips
Jquery optimization-tips
 
Building Robust jQuery Plugins
Building Robust jQuery PluginsBuilding Robust jQuery Plugins
Building Robust jQuery Plugins
 
How kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonHow kris-writes-symfony-apps-london
How kris-writes-symfony-apps-london
 
Backbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserBackbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The Browser
 
前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
 
Lithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate FrameworksLithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate Frameworks
 
Introduction to HTML5 Canvas
Introduction to HTML5 CanvasIntroduction to HTML5 Canvas
Introduction to HTML5 Canvas
 
Begin three.js.key
Begin three.js.keyBegin three.js.key
Begin three.js.key
 
ES6 Overview
ES6 OverviewES6 Overview
ES6 Overview
 
Improving android experience for both users and developers
Improving android experience for both users and developersImproving android experience for both users and developers
Improving android experience for both users and developers
 
Droidcon2013 android experience lahoda
Droidcon2013 android experience lahodaDroidcon2013 android experience lahoda
Droidcon2013 android experience lahoda
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
 

More from andreaplotner1

C++ Error upon run �Description Resource Path Location Type expected.pdf
C++ Error upon run �Description Resource Path Location Type expected.pdfC++ Error upon run �Description Resource Path Location Type expected.pdf
C++ Error upon run �Description Resource Path Location Type expected.pdf
andreaplotner1
 
Alex Jones is the majority owner and CEO of Harbour City Investments.pdf
Alex Jones is the majority owner and CEO of Harbour City Investments.pdfAlex Jones is the majority owner and CEO of Harbour City Investments.pdf
Alex Jones is the majority owner and CEO of Harbour City Investments.pdf
andreaplotner1
 
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdfC++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
andreaplotner1
 
Book Review Symposium on �Shareholder Value Myth�by Lynn StoutTh.pdf
Book Review Symposium on �Shareholder Value Myth�by Lynn StoutTh.pdfBook Review Symposium on �Shareholder Value Myth�by Lynn StoutTh.pdf
Book Review Symposium on �Shareholder Value Myth�by Lynn StoutTh.pdf
andreaplotner1
 
Background Maersk, headquartered in Denmark, is the world�s largest.pdf
Background Maersk, headquartered in Denmark, is the world�s largest.pdfBackground Maersk, headquartered in Denmark, is the world�s largest.pdf
Background Maersk, headquartered in Denmark, is the world�s largest.pdf
andreaplotner1
 
Application of Computational Vision in theMedicine Diagnosis of.pdf
Application of Computational Vision in theMedicine Diagnosis of.pdfApplication of Computational Vision in theMedicine Diagnosis of.pdf
Application of Computational Vision in theMedicine Diagnosis of.pdf
andreaplotner1
 
asap and all of those Draw an ER diagram for keeping track of inf.pdf
asap and all of those  Draw an ER diagram for keeping track of inf.pdfasap and all of those  Draw an ER diagram for keeping track of inf.pdf
asap and all of those Draw an ER diagram for keeping track of inf.pdf
andreaplotner1
 
Assessment 2 - Case Study Report � Groups of 3Susan Day is employe.pdf
Assessment 2 - Case Study Report � Groups of 3Susan Day is employe.pdfAssessment 2 - Case Study Report � Groups of 3Susan Day is employe.pdf
Assessment 2 - Case Study Report � Groups of 3Susan Day is employe.pdf
andreaplotner1
 

More from andreaplotner1 (11)

Also Share your Excel How it look likeCreate an excel file consist.pdf
Also Share your Excel How it look likeCreate an excel file consist.pdfAlso Share your Excel How it look likeCreate an excel file consist.pdf
Also Share your Excel How it look likeCreate an excel file consist.pdf
 
C++ Error upon run �Description Resource Path Location Type expected.pdf
C++ Error upon run �Description Resource Path Location Type expected.pdfC++ Error upon run �Description Resource Path Location Type expected.pdf
C++ Error upon run �Description Resource Path Location Type expected.pdf
 
Alex Jones is the majority owner and CEO of Harbour City Investments.pdf
Alex Jones is the majority owner and CEO of Harbour City Investments.pdfAlex Jones is the majority owner and CEO of Harbour City Investments.pdf
Alex Jones is the majority owner and CEO of Harbour City Investments.pdf
 
C++ Improper Function Definitions in Header FilesExplanation Ensu.pdf
C++ Improper Function Definitions in Header FilesExplanation Ensu.pdfC++ Improper Function Definitions in Header FilesExplanation Ensu.pdf
C++ Improper Function Definitions in Header FilesExplanation Ensu.pdf
 
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdfC++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
 
Book Review Symposium on �Shareholder Value Myth�by Lynn StoutTh.pdf
Book Review Symposium on �Shareholder Value Myth�by Lynn StoutTh.pdfBook Review Symposium on �Shareholder Value Myth�by Lynn StoutTh.pdf
Book Review Symposium on �Shareholder Value Myth�by Lynn StoutTh.pdf
 
Background Maersk, headquartered in Denmark, is the world�s largest.pdf
Background Maersk, headquartered in Denmark, is the world�s largest.pdfBackground Maersk, headquartered in Denmark, is the world�s largest.pdf
Background Maersk, headquartered in Denmark, is the world�s largest.pdf
 
Application of Computational Vision in theMedicine Diagnosis of.pdf
Application of Computational Vision in theMedicine Diagnosis of.pdfApplication of Computational Vision in theMedicine Diagnosis of.pdf
Application of Computational Vision in theMedicine Diagnosis of.pdf
 
asap and all of those Draw an ER diagram for keeping track of inf.pdf
asap and all of those  Draw an ER diagram for keeping track of inf.pdfasap and all of those  Draw an ER diagram for keeping track of inf.pdf
asap and all of those Draw an ER diagram for keeping track of inf.pdf
 
AssignmentActivity 1 Identifying Privacy ConcernsObjective T.pdf
AssignmentActivity 1 Identifying Privacy ConcernsObjective T.pdfAssignmentActivity 1 Identifying Privacy ConcernsObjective T.pdf
AssignmentActivity 1 Identifying Privacy ConcernsObjective T.pdf
 
Assessment 2 - Case Study Report � Groups of 3Susan Day is employe.pdf
Assessment 2 - Case Study Report � Groups of 3Susan Day is employe.pdfAssessment 2 - Case Study Report � Groups of 3Susan Day is employe.pdf
Assessment 2 - Case Study Report � Groups of 3Susan Day is employe.pdf
 

Recently uploaded

MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 

Recently uploaded (20)

Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 

a3.html code!DOCTYPE HTMLhtml lang=enhead meta c.pdf

  • 1. a3.html code Plaid Scarf Selector Plaid Scarf Selector Feels close to real cashmere (but costs a lot less). Think of this scarf as the next best thing to wearing authentic cashmere. Its microsueded fabric really is that soft. In fact, at first touch some mistake if for the real deal. Thats quite a compliment. Rose Mauve a3.js code //FUNCTIONS const $ = function (id) { return document.getElementById(id); } let centerImage = null; /****Add mouse function here for rollover effect on the center image****/ const swap = function(evt){ //a.GET CLICKED LINK const a = this; //b.GET CAPTION const caption = $("caption"); //console.log(centerImage); //console.log(a.getAttribute("href")); //console.log(a.getAttribute("id")); //c.CHANGE ENLARGED IMAGE'S SRC/ID TO CLICKED LINK centerImage.setAttribute("src", a.getAttribute("href")); //----------------------------------------------------------------
  • 2. /**You have to enable and edit the following line of code to make the program work correctly. What do you have to edit?**/ centerImage.setAttribute("id", a.getAttribute("id")); //---------------------------------------------------------------- //d.CHANGE THE CAPTION TO CLICKED LINK'S TITLE caption.firstChild.nodeValue = a.getAttribute("title"); //e.CANCEL DEFAULT ACTION OF EVENT evt.preventDefault(); } //ONLOAD EVENT HANDLER window.onload = function () { //GET ALL LINKS const listNode = $("image_list"); const aElements = listNode.getElementsByTagName("a"); //GET THE ENLARGED IMAGE ELEMENT centerImage = $("images/roseMauve2.jpg"); //PROCESS EACH IMAGE LINK let imageLink = null; for ( let i = 0; i < aElements.length; i++ ) { //1. GET LINK imageLink = aElements[i]; //2. PRELOAD THE IMAGES THAT WILL APPEAR IN THE CENTER //AND THE ROLLOVER IMAGES const image = new Image(); image.setAttribute("src",imageLink.getAttribute("href")); image.setAttribute("id",imageLink.getAttribute("id")); //3. ATTACH ALL EVENT HANDLERS TO APPROPRIATE FUNCTIONS imageLink.onclick = swap; }//end for loop }//end onload a3.css code /* type selectors */
  • 3. article, aside, figure, figcaption, footer, header, nav, section { display: block; } body { font-family: Arial, Helvetica, sans-serif; margin: 0 auto; padding: 20px; width: 550px; border: 3px solid blue; } h1, h2, ul, p { margin: 0; padding: 0; } h1 { padding-bottom: .25em; } h2 { font-size: 120%; padding: .5em 0 .25em; } li { padding-right: 10px; display: inline; } Scarf images black1.jpg black2.jpg harborBlue1.jpg harborBlue2.jpg red1.jpg red2.jpg roseMauve1. jpg roseMauve2.jpg