Check this trick !

Discussion in 'Chit Chat' started by SaswatPadhi, Jun 2, 2009.

  1. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,342
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    http://www.crackingforfun.blogspot.com
    Simple JavaScript trick which works with all browsers.
    Effect is impressive if the target page contains lots of images. Just check this out :

    Code:
    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='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5;DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++ }setInterval('A()',5); void(0);
    NOTE :: Full credits go to the original coder. This one is not created by me.
    Example :
    ~~~~~~~
    (1) Goto this google image search on "fractals" : http://images.google.co.in/images?q...ent=firefox-a&um=1&ie=UTF-8&sa=N&hl=en&tab=wi.
    (2) Let the page load fully.
    (3) Copy the above script completely and paste in the address bar.

    You will love the effect !

    Try it on myspace, flickr etc... ;)
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Really cool one but why it does not work same here on this page ?
     
  3. mayjune

    mayjune New Member

    Joined:
    Jun 14, 2009
    Messages:
    814
    Likes Received:
    33
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Pune,Delhi
    amazing...btw you should tell how to stop it also !!! lol..
    ps - after adding remove the last character i.e. semicolon it will move faster :p
    don't know why though....
     
  4. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,342
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    http://www.crackingforfun.blogspot.com
    Close the window/tab !

    Does NOT move faster for me !
     
  5. mayjune

    mayjune New Member

    Joined:
    Jun 14, 2009
    Messages:
    814
    Likes Received:
    33
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Pune,Delhi
    @saswat

    just tried, i think i know whats wrong....
    you must have pasted directly without the ;
    paste the normal code run it
    while its running, goto the address bar and remove the last ;
    then see...
    i hope that works...
     
  6. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,342
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    http://www.crackingforfun.blogspot.com
    @ MayJune :

    Oh, you are speaking about that .. Why do you need to remove the ';' then ?
    Just try to run and then try re-running it. It should run faster.

    FYI :

    If you study the java script closely, you will notice that it has a timer that takes care of animation; with an interval 5 ms. When you re-run the code, you add another timer with the same interval, but starting at a different time, so the animation appears to be faster (as the code is executed 2x time instead of 1x, due to double timers).
     
  7. mayjune

    mayjune New Member

    Joined:
    Jun 14, 2009
    Messages:
    814
    Likes Received:
    33
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Pune,Delhi
    @saswat
    ah i see, but then the code has changed as in isn't removing the semicolon make a big difference?
    also i notice if i paste this in other site, like google or i went to a wallpaper site and tried
    the pictures shifted, check out google.com and see....
    why it works for google image? as in what makes it tick at places..?
     
  8. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,342
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    http://www.crackingforfun.blogspot.com
    Removing the last semicolon is equivalent to not removing it.

    The shifting of pics happens here at G4EF too. I don't yet know about its cause.
     
  9. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    As I can understand It gets all the IMG tags and changes the position of the elements using Javascript
     
  10. websiteslate

    websiteslate New Member

    Joined:
    Jun 27, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Nice tips...thanks dear..
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice