Jump to content

Neat Little Javascript Trick


sdy284

Recommended Posts

java script:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+ "px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+" px"}R++}setInterval('A()',5); void(0);

 

copy and paste that into your address bar (preferably on a page with lots of images)

 

doing it on this page works well ;)

 

edit: be sure to take out the space between "java" and "script"

Share this post


Link to post
Share on other sites

It looks particularly cool on pages with a line of vertical images. This is a shameless plug, but if you look at one of my sites: AZ Game Cheats. The icons at the bottom look cool.

 

haha, this is awesome! thanks :) and lol, i spent 5 minutes trying to click the reply button :lol:

 

EDIT: hmmm, looking at the code, i wonder what other math functions you can stick in :D

Edited by The Unforgivin

Share this post


Link to post
Share on other sites

that is awesome...just dont do it and try to do a fast reply on this page, you cant click the button...

 

yeah you can, lol... i spent 5 minutes trying to click on it *hint, if you left click and hold, it'll stop ;)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...