SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    offsetX in firefox?

    Hi,

    Microsoft's offsetX/offsetY property doesn't work in Mozilla, do you know any alternative method for firefox?

    http://developer.mozilla.org/en/docs/DOM:event.layerX

    I know this but it works on "absolute" elements only

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know finding mouse pointer, please read my question..

    check this: http://www.sitepoint.com/forums/showthread.php?t=500731

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah. I see what you're asking now.

    The only feasible solution would be to use offsetLeft and offsetParent to find the position of the element's top left corner and then subtract that from pageX.

    Out of curiosity, why do want to find the coordinates within an element anyway?

    P.S. Why did you start this thread? (Link to older thread.) Next time please bump your thread instead of starting a new one.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


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
  •