PDA

View Full Version : Shaking Image on MouseOver



johnse4
10-10-2009, 06:33 AM
I found this article:

http://www.dynamicdrive.com/dynamicindex4/shake.htm

It works great it IE, but doesn't appear to work on Mozilla, Safari, or Chrome. The weird thing is that the demo appears to work in the other browsers, but the cut and paste script doesn't. Here is an example that I got to work in IE, but none of the other browsers:

http://www.ohmii.com/testimage.html

Can someone explain what I'm missing to make it compatible with the other broswers? Thanks in advance! :)

Troy III
10-10-2009, 08:19 AM
shake.style.top=parseInt(shake.style.top)+rector+'px';
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector+'px';
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector+'px';
}
else{
shake.style.left=parseInt(shake.style.left)-rector+'px';
}

johnse4
10-10-2009, 01:45 PM
Thanks Troy. Works like a charm!

edgar80
10-21-2009, 12:13 AM
Hello

I encountered the same problem and troy's answer resolved it!

Thanks Troy!!!