www.webdeveloper.com
Results 1 to 4 of 4

Thread: [RESOLVED] Alt tags?

  1. #1
    Join Date
    Aug 2006
    Posts
    3

    resolved [RESOLVED] Alt tags?

    Hi, I'm a total noob in javascript, and I would like to have something like an alt tag for an image.

    When a mouse goes over an image, usually it stays for only few seconds. I'd like one that can stay for as long as the mouse is over it. And that the description/comment that appears can have a background color.

    Is it possible?
    Last edited by dtan5; 08-03-2006 at 05:20 AM.

  2. #2
    Join Date
    Jan 2005
    Location
    Los Angeles, CA
    Posts
    4,887
    Overlib demo:
    http://www.samisite.com/test-csb2nf/overlib.htm
    Save the external JS file and use it on your own site:
    http://www.samisite.com/test-csb2nf/overlib.js
    Then to create an overlib:
    Code:
    <a href="javascript:void(0);" onmouseover="return overlib('This is an ordinary popup.');" onmouseout="return nd();" onfocus="this.blur()" title="">tooltip</a>

  3. #3
    Join Date
    Aug 2006
    Posts
    3
    Thanks!

    This is just what I was looking for!

  4. #4
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    The alt attribute displays alternate text when the image can't be displayed.

    It is the title attribute that pops up text when you mover the mouse over whatever part of the web page that has the attribute attached (including images and any other part of the page).

    Internet Explorer has a bug where it incorrectly displays the alt text when you move the mouse over an image that doesn't have title text attached. Other browsers only display title text when you hover over images (or any other part of the page).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles