Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2003
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rotating an image onClick

    I'm sure this can be done, I was wandering if somebody might now where i could pickup such a small script. It would have to swap it back on second click also.

    What it's used for is and arrow that will point down when a table is opened and then point to the right after it is closed. I totally suck at JavaScript and am trying to learn it on the fly with projects rather then sitting an dedicate a complete session to it.

    Any help would be great thanks guys.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    New York, USA
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi - you are looking for some basic image swapping. You can find a few tutorials regarding this at http://www.javascriptkit.com/javaindex.shtml
    good luck

  • #3
    New Coder
    Join Date
    Jun 2003
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the link. I'm gonna read a few of them as i need to get some of this crap down. Kinda funny i can do pretty much anything i want with PHP but can't write a single JavaScript script without looking for some kind of help.

    Thanks again.

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Anyway, the ideea is that, as far as I know, the images can not be rotated using DOM, "stricto senso" (latin expression:-)), as Flash appears to do. You need a number of different images which, as in movie, are visible/hidden one after another quickly, and creates the movement ilusion.

    In your case, you need maybe no more that two arrows, which are alternatively visible/hidden, according to the Event you have. That means you have to make a script which will manage the CSS style visible/hidden of the two objects, your 2 arrows
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •