SlideShare una empresa de Scribd logo
1 de 24
ARTDM 170, Week 3:
JavaScript Rollovers
         Gilbert Guerrero
       gguerrero@dvc.edu
http://gilbertguerrero.com/blog/
            artdm-170/
Turn in Homework
  Two GIF Animations
Save for Web and
     Devices...
Letʼs try this again in Photoshop
Put your files in my dropbox

•   Two GIF animations
•   Put them in a folder with your
    lastname and first initial
•   Example:
         smith-h
            anim1.gif
            anim2.gif
GIF animations
  Any volunteers?
JavaScript Rollovers
Rollover Images

•   Using JavaScript in a Web page, you
    can detect when a user has placed
    his or her mouse over an element
•   Applying this to an image, when the
    mouse is detected the script will
    show a new image
DOM - Document Object
Model
•   Rollovers use JavaScript and the
    DOM (Document Object Model)
•   DOM allows us to identify and
    manipulate any element on a Web
    page
Triggering Events
<html>
<head>
<script type="text/javascript">
<!--
    function testRoll() {
        alert('how are you?');
    }
//-->
</script>
</head>
<body>
<a href="#" onmouseover="testRoll();">Hello</
a>
</body>
</html>
The JavaScript
<head>
<script type="text/javascript">
<!--
  function testRoll() {
    alert('how are you?');
  }
//-->
</script>
</head>
The HTML
<body>
<a href="#"
onmouseover="testRoll();">Hello
</a>
</body>
JavaScript Image Rollover
<html>
<head>
<script type="text/javascript">
<!--
    function swapImage(id, theImage) {
        document.getElementById(id).src = theImage;
    }
//-->
</script>
</head>
<body>
<a href="#" onmouseover="swapImage('image1','images/
pic1-over.jpg');return false;"><img src="images/
pic1-out.jpg" id="image1" /></a>
</body>
</html>
The JavaScript
<head>
<script type="text/javascript">
<!--
  function swapImage(id, theImage) {
    document.getElementById(id).src = theImage;
  }
//-->
</script>
</head>
The HTML
<body>
<a href="#" onmouseover="swapImage('image1',
'images/pic1-over.jpg');return false;">
<img src="images/pic1-out.jpg" id="image1" />
</a>
</body>
An image is an image
even when that image is
     an animation
  Combine Animated GIFs with
     JavaScript Rollovers
Rollover with a click and then
another rollover
Button States
•   Up – Appears when the page first loads,
    the default image
•   Over – Appears when the mouse moves
    over the image
•   Down – Appears after the image has
    been clicked, a “pressed” state
•   Over While Down – Appears when the
    mouse moves over the image in the
    Down state
Using Animated Rollovers for
Navigation
Group Projects
Group projects
•   Create a website with at least 4 web pages

•   Devise a navigation scheme for the website
•   Use animated rollovers
•   Use all of the 4 states:
    ‣   Up (static image)

    ‣   Over (animated)
    ‣   Down (static image)
    ‣   Over While Down (animated)

•   Create one page per navigation item to demonstrate
    how it works
Form Groups
No less than 3 to a group
Group Project Deadlines
•   Due next week:
    ‣   Description (fill out form)

•   Next two weeks:

    ‣   Work on Group Projects

•   February 23: 
    ‣   Presentations of completed projects
Turn in a description of
  your Group Project
 Fill out the Group Project Form
Homework, due Feb 16

•   Create a Web page with a rollover
    that uses a GIF animation in
    Dreamweaver
•   Work on Group projects

Más contenido relacionado

La actualidad más candente

Intro to wordpress short course
Intro to wordpress short courseIntro to wordpress short course
Intro to wordpress short course
carishurd
 

La actualidad más candente (19)

設計與程式的溝通之道
設計與程式的溝通之道設計與程式的溝通之道
設計與程式的溝通之道
 
WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPress
 
Discover the power of browser developer tools
Discover the power of browser developer toolsDiscover the power of browser developer tools
Discover the power of browser developer tools
 
Intro to wordpress short course
Intro to wordpress short courseIntro to wordpress short course
Intro to wordpress short course
 
Advanced Custom Fields(ACF) + Page Builder at WordPress meetup Stockholm 2016...
Advanced Custom Fields(ACF) + Page Builder at WordPress meetup Stockholm 2016...Advanced Custom Fields(ACF) + Page Builder at WordPress meetup Stockholm 2016...
Advanced Custom Fields(ACF) + Page Builder at WordPress meetup Stockholm 2016...
 
Diving into SngularJS
Diving into SngularJSDiving into SngularJS
Diving into SngularJS
 
Web pro
Web proWeb pro
Web pro
 
HTML5+CSS3 (入門編)
HTML5+CSS3 (入門編)HTML5+CSS3 (入門編)
HTML5+CSS3 (入門編)
 
wp cli- don’t fear the command line
wp cli- don’t fear the command linewp cli- don’t fear the command line
wp cli- don’t fear the command line
 
OSGi Web Development in Action
OSGi Web Development in ActionOSGi Web Development in Action
OSGi Web Development in Action
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorial
 
TallyJS #1 - Intro to AngularJS
TallyJS #1 - Intro to AngularJSTallyJS #1 - Intro to AngularJS
TallyJS #1 - Intro to AngularJS
 
Building the Front End with AngularJS
Building the Front End with AngularJSBuilding the Front End with AngularJS
Building the Front End with AngularJS
 
Introduction to koyomi #appkoyomi
Introduction to koyomi #appkoyomiIntroduction to koyomi #appkoyomi
Introduction to koyomi #appkoyomi
 
Using WordPress with Static Site Generators by Muhammad Muhsin and Jason Bahl...
Using WordPress with Static Site Generators by Muhammad Muhsin and Jason Bahl...Using WordPress with Static Site Generators by Muhammad Muhsin and Jason Bahl...
Using WordPress with Static Site Generators by Muhammad Muhsin and Jason Bahl...
 
Making websites with WordPress
Making websites with WordPressMaking websites with WordPress
Making websites with WordPress
 
Firebug: Javascript Development Made Easier
Firebug: Javascript Development Made EasierFirebug: Javascript Development Made Easier
Firebug: Javascript Development Made Easier
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPress
 
Phone gap & jquerymobile
Phone gap & jquerymobilePhone gap & jquerymobile
Phone gap & jquerymobile
 

Destacado

Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2
slmnsvn
 
ARTDM 171 Web Design: Week 1 Overview
ARTDM 171 Web Design: Week 1 OverviewARTDM 171 Web Design: Week 1 Overview
ARTDM 171 Web Design: Week 1 Overview
Gilbert Guerrero
 
ARTDM 171 Week 8: Remapping Cyberspace
ARTDM 171 Week 8: Remapping CyberspaceARTDM 171 Week 8: Remapping Cyberspace
ARTDM 171 Week 8: Remapping Cyberspace
Gilbert Guerrero
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
slmnsvn
 
Smart parking system
Smart parking systemSmart parking system
Smart parking system
slmnsvn
 

Destacado (19)

Phoebe Scalf Visual Porfolio
Phoebe Scalf Visual PorfolioPhoebe Scalf Visual Porfolio
Phoebe Scalf Visual Porfolio
 
El mundo real: Profesionales de marketing que han destacado
El mundo real: Profesionales de marketing que han destacadoEl mundo real: Profesionales de marketing que han destacado
El mundo real: Profesionales de marketing que han destacado
 
Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2
 
SEOGuardian - Residencias para jóvenes españa - Actualización
SEOGuardian - Residencias para jóvenes españa - ActualizaciónSEOGuardian - Residencias para jóvenes españa - Actualización
SEOGuardian - Residencias para jóvenes españa - Actualización
 
ARTDM 171 Web Design: Week 1 Overview
ARTDM 171 Web Design: Week 1 OverviewARTDM 171 Web Design: Week 1 Overview
ARTDM 171 Web Design: Week 1 Overview
 
ARTDM 171 Week 8: Remapping Cyberspace
ARTDM 171 Week 8: Remapping CyberspaceARTDM 171 Week 8: Remapping Cyberspace
ARTDM 171 Week 8: Remapping Cyberspace
 
De olho no fã: como transformar o seu hobby em uma carreira
De olho no fã: como transformar o seu hobby em uma carreiraDe olho no fã: como transformar o seu hobby em uma carreira
De olho no fã: como transformar o seu hobby em uma carreira
 
SEOGuardian - Alquiler de Vehiculos España - Actualización
SEOGuardian - Alquiler de Vehiculos España - ActualizaciónSEOGuardian - Alquiler de Vehiculos España - Actualización
SEOGuardian - Alquiler de Vehiculos España - Actualización
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
 
SEOGuardian - Embutidos Online en España - Actualización
SEOGuardian - Embutidos Online en España - ActualizaciónSEOGuardian - Embutidos Online en España - Actualización
SEOGuardian - Embutidos Online en España - Actualización
 
Smart parking system
Smart parking systemSmart parking system
Smart parking system
 
Mechanical project list
Mechanical project listMechanical project list
Mechanical project list
 
How to integrate Channels, Content and Marketing around the customer - 'Creat...
How to integrate Channels, Content and Marketing around the customer - 'Creat...How to integrate Channels, Content and Marketing around the customer - 'Creat...
How to integrate Channels, Content and Marketing around the customer - 'Creat...
 
How to Have a Successful Engagement and a Happily Ever After: “New Age” Nuanc...
How to Have a Successful Engagement and a Happily Ever After: “New Age” Nuanc...How to Have a Successful Engagement and a Happily Ever After: “New Age” Nuanc...
How to Have a Successful Engagement and a Happily Ever After: “New Age” Nuanc...
 
Compliance Is One of the Best Ways to Market Your Business
Compliance Is One of the Best Ways to Market Your BusinessCompliance Is One of the Best Ways to Market Your Business
Compliance Is One of the Best Ways to Market Your Business
 
Strategic Thinking
Strategic ThinkingStrategic Thinking
Strategic Thinking
 
Beloved Brands Explained
Beloved Brands ExplainedBeloved Brands Explained
Beloved Brands Explained
 
Tháp đôi Petronas - Malaysia
Tháp đôi Petronas - MalaysiaTháp đôi Petronas - Malaysia
Tháp đôi Petronas - Malaysia
 
A novel wall switched step-dimming concept in led lighting systems using pfc ...
A novel wall switched step-dimming concept in led lighting systems using pfc ...A novel wall switched step-dimming concept in led lighting systems using pfc ...
A novel wall switched step-dimming concept in led lighting systems using pfc ...
 

Similar a ARTDM 170, Week 3: Rollovers

Artdm170 Week4 Java Script Effects
Artdm170 Week4 Java Script EffectsArtdm170 Week4 Java Script Effects
Artdm170 Week4 Java Script Effects
Gilbert Guerrero
 
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptjQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
Philipp Bosch
 
ARTDM 170 Week 3: Rollovers
ARTDM 170 Week 3: RolloversARTDM 170 Week 3: Rollovers
ARTDM 170 Week 3: Rollovers
Gilbert Guerrero
 

Similar a ARTDM 170, Week 3: Rollovers (20)

JavaScript
JavaScriptJavaScript
JavaScript
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Revolver
RevolverRevolver
Revolver
 
React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix
 
JavaScript on the Desktop
JavaScript on the DesktopJavaScript on the Desktop
JavaScript on the Desktop
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
 
Artdm170 Week4 Java Script Effects
Artdm170 Week4 Java Script EffectsArtdm170 Week4 Java Script Effects
Artdm170 Week4 Java Script Effects
 
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptjQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
 
JS Fest 2018. Илья Иванов. Введение в React-Native
JS Fest 2018. Илья Иванов. Введение в React-NativeJS Fest 2018. Илья Иванов. Введение в React-Native
JS Fest 2018. Илья Иванов. Введение в React-Native
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
React Native: Introduction
React Native: IntroductionReact Native: Introduction
React Native: Introduction
 
Developing jQuery Plugins with Ease
Developing jQuery Plugins with EaseDeveloping jQuery Plugins with Ease
Developing jQuery Plugins with Ease
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
 
ARTDM 170 Week 3: Rollovers
ARTDM 170 Week 3: RolloversARTDM 170 Week 3: Rollovers
ARTDM 170 Week 3: Rollovers
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web Apps
 
Steph's Html5 and css presentation
Steph's Html5 and css presentationSteph's Html5 and css presentation
Steph's Html5 and css presentation
 
Steph's Html5 and css presentation
Steph's Html5 and css presentationSteph's Html5 and css presentation
Steph's Html5 and css presentation
 
Beyond the Standards
Beyond the StandardsBeyond the Standards
Beyond the Standards
 

Más de Gilbert Guerrero

ARTDM 171, Week 17: Usability Testing and QA
ARTDM 171, Week 17: Usability Testing and QAARTDM 171, Week 17: Usability Testing and QA
ARTDM 171, Week 17: Usability Testing and QA
Gilbert Guerrero
 
Artdm 170 week15 publishing
Artdm 170 week15 publishingArtdm 170 week15 publishing
Artdm 170 week15 publishing
Gilbert Guerrero
 
ARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + ArraysARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + Arrays
Gilbert Guerrero
 
ARTDM 170, Week 14: Introduction to Processing
ARTDM 170, Week 14: Introduction to ProcessingARTDM 170, Week 14: Introduction to Processing
ARTDM 170, Week 14: Introduction to Processing
Gilbert Guerrero
 
ARTDM 171, Week 13: Navigation Schemes
ARTDM 171, Week 13: Navigation SchemesARTDM 171, Week 13: Navigation Schemes
ARTDM 171, Week 13: Navigation Schemes
Gilbert Guerrero
 
Artdm170 week12 user_interaction
Artdm170 week12 user_interactionArtdm170 week12 user_interaction
Artdm170 week12 user_interaction
Gilbert Guerrero
 
Artdm 171 Week12 Templates
Artdm 171 Week12 TemplatesArtdm 171 Week12 Templates
Artdm 171 Week12 Templates
Gilbert Guerrero
 
ARTDM 171, Week 10: Mood Boards + Page Comps
ARTDM 171, Week 10: Mood Boards + Page CompsARTDM 171, Week 10: Mood Boards + Page Comps
ARTDM 171, Week 10: Mood Boards + Page Comps
Gilbert Guerrero
 
ARTDM 170, Week 10: Encapsulation + Paper Prototypes
ARTDM 170, Week 10: Encapsulation + Paper PrototypesARTDM 170, Week 10: Encapsulation + Paper Prototypes
ARTDM 170, Week 10: Encapsulation + Paper Prototypes
Gilbert Guerrero
 
ARTDM 171, Week 9: User Experience
ARTDM 171, Week 9: User ExperienceARTDM 171, Week 9: User Experience
ARTDM 171, Week 9: User Experience
Gilbert Guerrero
 
ARTDM 171, Week 7: Remapping Cyberspace
ARTDM 171, Week 7: Remapping CyberspaceARTDM 171, Week 7: Remapping Cyberspace
ARTDM 171, Week 7: Remapping Cyberspace
Gilbert Guerrero
 
ARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting InteractivityARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting Interactivity
Gilbert Guerrero
 
Artdm170 week6 scripting_motion
Artdm170 week6 scripting_motionArtdm170 week6 scripting_motion
Artdm170 week6 scripting_motion
Gilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 

Más de Gilbert Guerrero (20)

Designing for Skepticism and Bright Sunlight
Designing for Skepticism and Bright SunlightDesigning for Skepticism and Bright Sunlight
Designing for Skepticism and Bright Sunlight
 
ARTDM 171, Week 17: Usability Testing and QA
ARTDM 171, Week 17: Usability Testing and QAARTDM 171, Week 17: Usability Testing and QA
ARTDM 171, Week 17: Usability Testing and QA
 
Artdm 171 week15 seo
Artdm 171 week15 seoArtdm 171 week15 seo
Artdm 171 week15 seo
 
Artdm 170 week15 publishing
Artdm 170 week15 publishingArtdm 170 week15 publishing
Artdm 170 week15 publishing
 
ARTDM 171, Week 14: Forms
ARTDM 171, Week 14: FormsARTDM 171, Week 14: Forms
ARTDM 171, Week 14: Forms
 
ARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + ArraysARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + Arrays
 
ARTDM 170, Week 14: Introduction to Processing
ARTDM 170, Week 14: Introduction to ProcessingARTDM 170, Week 14: Introduction to Processing
ARTDM 170, Week 14: Introduction to Processing
 
ARTDM 171, Week 13: Navigation Schemes
ARTDM 171, Week 13: Navigation SchemesARTDM 171, Week 13: Navigation Schemes
ARTDM 171, Week 13: Navigation Schemes
 
Artdm170 week12 user_interaction
Artdm170 week12 user_interactionArtdm170 week12 user_interaction
Artdm170 week12 user_interaction
 
Artdm 171 Week12 Templates
Artdm 171 Week12 TemplatesArtdm 171 Week12 Templates
Artdm 171 Week12 Templates
 
ARTDM 171, Week 10: Mood Boards + Page Comps
ARTDM 171, Week 10: Mood Boards + Page CompsARTDM 171, Week 10: Mood Boards + Page Comps
ARTDM 171, Week 10: Mood Boards + Page Comps
 
ARTDM 170, Week 10: Encapsulation + Paper Prototypes
ARTDM 170, Week 10: Encapsulation + Paper PrototypesARTDM 170, Week 10: Encapsulation + Paper Prototypes
ARTDM 170, Week 10: Encapsulation + Paper Prototypes
 
ARTDM 171, Week 9: User Experience
ARTDM 171, Week 9: User ExperienceARTDM 171, Week 9: User Experience
ARTDM 171, Week 9: User Experience
 
ARTDM 171, Week 7: Remapping Cyberspace
ARTDM 171, Week 7: Remapping CyberspaceARTDM 171, Week 7: Remapping Cyberspace
ARTDM 171, Week 7: Remapping Cyberspace
 
ARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting InteractivityARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting Interactivity
 
Artdm170 week6 scripting_motion
Artdm170 week6 scripting_motionArtdm170 week6 scripting_motion
Artdm170 week6 scripting_motion
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
 
Artdm171 Week6 Images
Artdm171 Week6 ImagesArtdm171 Week6 Images
Artdm171 Week6 Images
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
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
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
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
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 

ARTDM 170, Week 3: Rollovers

  • 1. ARTDM 170, Week 3: JavaScript Rollovers Gilbert Guerrero gguerrero@dvc.edu http://gilbertguerrero.com/blog/ artdm-170/
  • 2. Turn in Homework Two GIF Animations
  • 3. Save for Web and Devices... Letʼs try this again in Photoshop
  • 4. Put your files in my dropbox • Two GIF animations • Put them in a folder with your lastname and first initial • Example:      smith-h anim1.gif anim2.gif
  • 5. GIF animations Any volunteers?
  • 7. Rollover Images • Using JavaScript in a Web page, you can detect when a user has placed his or her mouse over an element • Applying this to an image, when the mouse is detected the script will show a new image
  • 8. DOM - Document Object Model • Rollovers use JavaScript and the DOM (Document Object Model) • DOM allows us to identify and manipulate any element on a Web page
  • 9. Triggering Events <html> <head> <script type="text/javascript"> <!--     function testRoll() {         alert('how are you?');     } //--> </script> </head> <body> <a href="#" onmouseover="testRoll();">Hello</ a> </body> </html>
  • 10. The JavaScript <head> <script type="text/javascript"> <!-- function testRoll() {     alert('how are you?'); } //--> </script> </head>
  • 12. JavaScript Image Rollover <html> <head> <script type="text/javascript"> <!--     function swapImage(id, theImage) {         document.getElementById(id).src = theImage;     } //--> </script> </head> <body> <a href="#" onmouseover="swapImage('image1','images/ pic1-over.jpg');return false;"><img src="images/ pic1-out.jpg" id="image1" /></a> </body> </html>
  • 13. The JavaScript <head> <script type="text/javascript"> <!-- function swapImage(id, theImage) {     document.getElementById(id).src = theImage; } //--> </script> </head>
  • 14. The HTML <body> <a href="#" onmouseover="swapImage('image1', 'images/pic1-over.jpg');return false;"> <img src="images/pic1-out.jpg" id="image1" /> </a> </body>
  • 15. An image is an image even when that image is an animation Combine Animated GIFs with JavaScript Rollovers
  • 16. Rollover with a click and then another rollover
  • 17. Button States • Up – Appears when the page first loads, the default image • Over – Appears when the mouse moves over the image • Down – Appears after the image has been clicked, a “pressed” state • Over While Down – Appears when the mouse moves over the image in the Down state
  • 18. Using Animated Rollovers for Navigation
  • 20. Group projects • Create a website with at least 4 web pages • Devise a navigation scheme for the website • Use animated rollovers • Use all of the 4 states: ‣ Up (static image) ‣ Over (animated) ‣ Down (static image) ‣ Over While Down (animated) • Create one page per navigation item to demonstrate how it works
  • 21. Form Groups No less than 3 to a group
  • 22. Group Project Deadlines • Due next week: ‣ Description (fill out form) • Next two weeks: ‣ Work on Group Projects • February 23:  ‣ Presentations of completed projects
  • 23. Turn in a description of your Group Project Fill out the Group Project Form
  • 24. Homework, due Feb 16 • Create a Web page with a rollover that uses a GIF animation in Dreamweaver • Work on Group projects

Notas del editor

  1. Let&apos;s take a look at the Photoshop mockup.