SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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 ...
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Kürzlich hochgeladen (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
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
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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.
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 

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

Hinweis der Redaktion

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