JavaScript and Ajax for the Web, Sixth Edition: Visual QuickStart Guide
by Tom Negrino, Dori Smith
Chapter 4. Working with Images
One of the best uses of JavaScript is to add visual interest to Web pages by animating graphics, and that’s what this chapter is all about. Making an image on a Web page change when the user moves the mouse over the image, thereby making the page react to the user, is one of the most common—and effective—tricks you can learn in JavaScript. This rollover, as it is called, is easy to implement, yet has many applications, as you’ll see.
Rollovers are a great tool, but you can do much more than rollovers with JavaScript, such as automatically change images, create ad banners, build slideshows, and display random images on a page.
In this chapter, you’ll learn how to make JavaScript do all of these image tricks. Let’s get ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access