The Web Wizards Guide To JavaScript - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

The Web Wizards Guide To JavaScript

Description:

To learn how to create a navigation page with multiple rollover images. To understand how to create a double-rollover page. Creating a Simple Rollover ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 7
Provided by: stevenes
Category:
Tags: javascript | create | guide | how | to | web | wizards

less

Transcript and Presenter's Notes

Title: The Web Wizards Guide To JavaScript


1
The Web Wizards Guide To JavaScript
  • Chapter 4
  • Image Swapping

2
Chapter Objectives
  • To learn how to code a simple rollover
  • To find out how to preload image files into the
    browsers cache folder.
  • To learn how to create a navigation page with
    multiple rollover images
  • To understand how to create a double-rollover page

3
Creating a Simple Rollover
  • It is possible to create a crude rollover effect
    by changing the SRC property of an with a
    simple JavaScript statement in an onmouseover
    event handler. This technique is not recommended,
    however, because it produces a delay in loading
    the second image.

4
Preloading Images
  • Preloading image files into the browsers cache
    creates more effective rollovers and lets you
    expand your rollover code to accommodate multiple
    rollover images or even double rollovers.
  • Testing for the presence of the document.images
    array is an easy way to ensure that only those
    browsers that support the Image object will
    attempt to run your image swapping code.

5
Multiple Rollover Images
  • By passing parameter values, you can create
    multiple rollover image swaps using a single
    function.

6
Double Rollover
  • A double rollover changes two image files when
    the mouse is rolled on top of each image.
  • This interface enhancement gives the visitor
    additional information about each link when the
    mouse rolls over the linked image.
Write a Comment
User Comments (0)
About PowerShow.com