Results 1 to 4 of 4

Thread: Rollover script - Changes text.

  1. #1
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Rollover script - Changes text.

    HI,
    I need some help in making a menu which you can rollover and it produces content next to it. Well its not really a menu as such it will be used for news headlines with a short description on the side and after it has been rolled over the full story appears on the side. I have linked to a video below which will hopefully demonstrate what i mean. Any help as how to code this will be appreciated.

    http://s121.photobucket.com/albums/o...t=SANY0023.flv

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    That looks like a nice script on the video. And it should be very easy to do, if I understand what you want.

    What you need is some <div id="1a" onmouseover="showstory(this)"> tags for the "link" (if you want to call them that) and some <div id="1ab" style="display:none"> tags for the stories. Then you create a function in JS called showstory() that take in the value of this (the id of the div) and changes the display to block.

    e.g.:
    Code:
    function showstory(id){
    document.getElementById(id+"b").style.display = "block";
    }
    And you'll need a function to do the opposite. display = "none" onmouseout
    Last edited by Jas; 12-09-2007 at 12:41 AM.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #3
    Join Date
    Dec 2007
    Location
    Essex, UK
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Tou could try modifying the floating tooltip technique described here.

    You would need to have the <span> to always position itself in the same place.

    Re the video. To show a run of a series of screenshots, Wink is an excellent capture program that creates a swf file.

    John Rostron

  4. #4
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi,
    Could you give an example of how the above code would work in full?
    Cheers

Bookmarks

Posting Permissions

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