SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Ian Alexander
    SitePoint Community Guest

    Fast Javascript Mouse Over

    I've seen some sites where their mouseovers are super quick. All of the ones I've done aren't slow but it's like there's a slight 1/3 or 1/2 second delay to them.

    Can anybody tell me how they do this?

    1 example, off the top of my head, is the earthlink.net site

    check their menu tabs in the middle of their homepage. They're really quick. I want that!

    - Ian

  2. #2
    Ian Alexander
    SitePoint Community Guest

    I checked View Source

    I checked to View Source to check out the code and I don't quite see what's so different about it...

  3. #3
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The rollover images on that site are preloaded using JavaScript (which is standard practice really). If yours/others are slower, it's because you/they haven't done this!
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  4. #4
    Alt+F4= User Control ;-) rabmurdy's Avatar
    Join Date
    Mar 2002
    Location
    Ecosse
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Try this example

    Try this example, it works a treat for me.

    ---------------



    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin

    image1 = new Image();
    image1.src = "graphics/buttons/home.gif";

    image2 = new Image();
    image2.src = "graphics/buttons/next.gif";

    // End -->
    </script>
    <--! Put the above code into the head -->

    <--! Use the code below for the links/buttons-->


    <td><a href="" onmouseover="image1.src='graphics/buttons/home.gif';"
    onmouseout="image1.src='graphics/buttons/ahome.gif';">
    <img name="image1" src="graphics/buttons/ahome.gif" border=0 alt=""></a></td>
    </tr>
    <tr>
    <td><a href="" onmouseover="image2.src='graphics/buttons/next.gif';"
    onmouseout="image2.src='graphics/buttons/anext.gif';">
    <img name="image2" src="graphics/buttons/anext.gif" border=0 alt=""></a></td>
    </tr>

    ---------------


    Hope you can use this code, if your stuck let us know.

    Rab
    "If something is too hard,give it up. The moral my boy is too never try anything"
    "Just because I don't care doesn't mean I don't understand"


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
  •