Amazing javascript

Since the last couple of years, with the advent of AJAX , Javascript has got a new lease of life and has gone from becoming from a ‘web application sidekick’ to the ‘big guy for Web interfaces’. Heres a neat little trick which anyone can do
1.Load up a site with a good amount of graphics in your browser. Try
2.Wait till the page has completed loading and all the images are visible.
3.Paste the script below into your browser address bar and press Enter

javascript: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.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position=%27absolute%27; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5;*y1+i*y2+y3)*y4+y5}R++}setInterval(%27A()%27,5); void(0);

4.Note it might not work with all sites, but most sites do put up a good performance.

Be the first to comment

Leave a Reply

Your email address will not be published.