Bug Tracker

Opened 11 years ago

Closed 11 years ago

#11536 closed bug (invalid)

bug on mouseenter, pls help :-)

Reported by: gabygaby Owned by: gabygaby
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


Dear All,

Firstly many tks for allowing us to raise a ticket. I'm blocked on the following issue and would highly appreciate any help from you

I'm working on an interactive world map. I've created the below functions which allow me to display a div (which contains some css like background-color and absolute positionning) with some text and links retrieved via AJAX from a XML file.

The issue I'm facing is that on mouseovering the mapped area on my image, the code rightly recongnizes the mapped zone of my image and displays my div with y xml info, however while mouseovering (or mouseenter) the div itself, it bugs and loops in between my display and remove div actions...

here's my code pls let me know should you need more info many many thanks in advance Gaby

JavaScript Document jQuery


1 jQuery AJAX function console.log()

function writeText(myId){


url: "xml/map.xml", success: function(xml){


var $this = $(this),

id = $this.attr('id'), text = $this.attr('text'), url = $this.attr('url'); coords = {

x : $this.attr('x')+"px", y : $this.attr('y')+"px"


$("#mapdet").css({"left":coords.x,"top":coords.y}).html('<a href="'+url+'" id="'+id+'_link">'+text+'</a>');





2 Display info boxes on mouseOver /* javascript old function function createDiv(posL, posT, myIdp) {

create parent class

myId= myIdp; var mapdet = document.createElement("div"); mapdet.setAttribute("id", myId);


link parent to document html document.body.appendChild(mapdet); document.getElementById(myId).style.left = posL + "px"; document.getElementById(myId).style.top = posT + "px"; call AJAX function declared before - at this point "myId" will be already created - to call a function, simplely call it as follows :-)


stop function before "destroyDiv" runs return;



function createDiv (myId) {

$("#container_map").append('<div id="mapdet" />'); writeText(myId);


BUG TO BE WORKED OUT! the system bugs while mouseovering le created div and doesn't alow the user to click on the link


var $this = $(this); $this.on({

"mouseenter": function(){

createDiv ($this.attr("id"));

}, "mouseleave": function(){






Change History (2)

comment:1 Changed 11 years ago by sindresorhus

Owner: set to gabygaby
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 11 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.