Results 1 to 3 of 3

Thread: Need code

  1. #1
    Join Date
    Feb 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Need code

    Several years ago I found a code that used 2 images. It was what I guess would possibly be called mouse over effect. There is 1 image showing and when you put the mouse over that image it changed to another image. similar to a button that when the mouse is over it, it changed to look like it was depressed. I used this code for links in a specific section of my site. Does anyone know what this code is called or where I can find it, as I lost my copy of the code and would like to use it again. Hope someone understands what I'm talking about.


    Thanks for any help
    Last edited by quadc281; 02-15-2008 at 07:29 PM. Reason: spl

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There are many such scripts available around the web. They are generally known as rollovers. The DD version is:

    http://www.dynamicdrive.com/dynamicindex15/domroll.htm

    Without using any formal script, a single rollover could be done like so:

    Code:
    <img src="off.gif" 
    onmouseover="this.src='on.gif';" 
    onmouseout="this.src='off.gif';><img 
    style="position:absolute;visibiity:hidden;" 
    src="on.gif">
    The second image tag takes up no space and is invisible. It is only there to 'preload' the rollover image. There are other methods of preloading.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Many types and many ways. If you don't want to use JavaScript there are pure CSS ways to do it as well.

    I have outlined a couple ways of doing it on a test site of mine.

    You can see the tutorials here
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

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
  •