SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    May 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Firefox Tooltip Problem

    Hello. I try to show a casual tooltip for anchor links and prevent the default tooltip showing actions of FF by event.preventDefault();, but it doesnt help. What is the problem here?
    Thanks in advance.

  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)
    window.event is for IE. For other browsers, the event in question is passed as the first argument of the function:
    Code:
    el.onmouseover = func;
    var func = function(e) {
      if (window.event) window.event.returnValue = false;
      else if (e) e.preventDefault();
    }
    Note that IE doesn't support preventDefault, so you have to do the above to cater for both IE and decent browsers.


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
  •