<style>
..shakeimage{
position:relati ve
}
</style>
<script language="JavaS cript1.2">
/*
Shake image script (onMouseover)-
C Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit
*/
//configure shake degree (where larger # equals greater shake)
var rector=3
///////DONE EDITTING///////////
var stopit=0
var a=1
function init(which){
stopit=0
shake=which
shake.style.lef t=0
shake.style.top =0
}
function rattleimage(){
if ((!document.all &&!document.get ElementById)||s topit==1)
return
if (a==1){
shake.style.top =parseInt(shake .style.top)+rec tor
}
else if (a==2){
shake.style.lef t=parseInt(shak e.style.left)+r ector
}
else if (a==3){
shake.style.top =parseInt(shake .style.top)-rector
}
else{
shake.style.lef t=parseInt(shak e.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rat tleimage()",50)
}
function stoprattle(whic h){
stopit=1
which.style.lef t=0
which.style.top =0
}
</script>
Style Scripts
Comment