SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2004
    Location
    Somewhere in the Middle East
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rollover image code not working

    Hi, I have a horizontal navigation bar that uses a rollover image. I tried to preload the rollover image but it's not clear that the JavaScript I used works as I have to wait for a couple of seconds when I rollover the image for the rollover image to take effect. See what I mean on my Israeli cheese website.

    Many, many thanks,

    Leao

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The javascript is waiting for the image to be downloaded. You don't even need javascript for this, especially not the nasty script that comes with Dreamweaver (which you have put in an equally nasty inline event handler).

    Use CSS. That will ensure the image is cached and you can easily apply a trick to make the image be downloaded before it is actually used. You can even use the same image for each item in the navigation if you use it as a background image. You would need to give it some negative horizontal positioning for the outermost items.

    Just out of curiosity - is the rightmost wheel supposed to spin in the opposite direction to the other wheels?

    BTW, I really think you have over-done the SEO on your website. URLs are supposed to be human-friendly too, and at the moment they are overly bloated and confusing.


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
  •