Results 1 to 1 of 1

Thread: JS try to use hover on map areas

  1. #1
    Join Date
    Aug 2011
    Location
    both, Germany and Bulgaria
    Posts
    54
    Thanks
    14
    Thanked 10 Times in 10 Posts

    Lightbulb JS try to use hover on map areas

    Hello everybody,

    I've tried to use the jQuery .hover() for html map areas. Basically it works, but not correct: during the time the mouse is over an element, the onmouseover-picture appears and disappears on each mouse move. I can't figure it out, why it doesn't work as expected..., e.g. stay there and stop disappearing on mouse move?!

    I've also tried to replace the .hover() by .mouseenter() followed by .mouseleave() but with same result. And at least, I've removed the .mouseleave() event with the hope, I could just let the script show the first picture and then the second. Unfortunately, the script stops after showing one picture.

    If you just could take a look here: http://x-mediapro.de/testing/sofiamap/trymap.html

    Thanks in advance!!
    OK, I was too quickly to ask, and think after... The html map object is always connected to an image. If my script shows a second image over the first one, the mouse is no more over the map, because the second image fits just between the mapped one and the mouse pointer. That's why the script considers, that the mouse should be out and executes the part for mouseleave. Which removes the second image and the mouse is over the first mapped image again. This is recognized by the script again, and the mouseover event is called again, and so long...
    Last edited by XManBG; 11-02-2011 at 12:46 AM. Reason: Resolved by myself :)

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
  •