Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> JavaScript >> Snippet

Image wiggle on click


< html >
< head >
<!-- Original :  CodeLifter.com (support@codelifter.com) -->
<!-- Web Site :  http : //www.codelifter.com -->
< style >
<!--
.mouseBeOffMe {
border - top :    10px  solid #E0E0E0;
border - bottom : 10px  solid #E0E0E0;
border - left :   6px   solid #E0E0E0;
border - right :  10px  solid #E0E0E0;
}
.mouseBeOnMe {
border - top :    6px   solid #E0E0E0;
border - bottom : 14px  solid #E0E0E0;
border - left :   10px  solid #E0E0E0;
border - right :  6px   solid #E0E0E0;
}
.mouseBeDown {
border - top :    13px  solid #E0E0E0;
border - bottom : 7px   solid #E0E0E0;
border - left :   10px  solid #E0E0E0;
border - right :  6px   solid #E0E0E0;
}
.mouseBeUp {
border - top :    10px  solid #E0E0E0;
border - bottom : 10px  solid #E0E0E0;
border - left :   10px  solid #E0E0E0;
border - right :  6px   solid #E0E0E0;
}
//-->
</ style >

</ head >

< body bgcolor = #e0e0e0 >
< center >< BR >< BR >< BR >
< img src = " ball.gif"
title = " This is the Image Label"
width = " 30"
height = " 30"
border = " 0"
class = " mouseBeOffMe"
onmouseover = " this.className='mouseBeOnMe'"
onmousedown = " this.className='mouseBeDown'"
onmouseup = " this.className='mouseBeUp'"
onmouseout = " this.className='mouseBeOffMe'" >
< br >
< br >

Move your mouse over the image above.  Try clicking on it also !

</ center >
</ BODY >
</ html >

//Thanks to David Pye for his JavaScript Vault contribution.