jQuery Tools Tooltip hover not detected after link click

828 views Asked by At

Using the tooltip plugin from the jQuery Tools I successfully generate a tooltip with the following code.

$(".link_prijskaart").tooltip({
    tip: "#tooltip_prijskaart",
    position: "bottom center",
    delay: 1200,
    events: {
        def: 'click,mouseout',
        tooltip: 'mouseenter,mouseleave'
    },
    offset: [0, 90]
});

The tooltip itself is a simple HTML with anchor links in it, these links link to PDF files. When clicked, the PDF gets streamed and downloaded. After this process, the tooltip does not detect an hover anymore. When the target is clicked the tooltip opens, but the leaving the target closes the tooltip; the tooltip hover event does not seem to trigger (tested in Firefox 3.6 and IE8).

Does anyone have an idea why after clicking in a link the tooltip the mouseenter and mouseleave events as defined do not register anymore?

1

There are 1 answers

0
Lajos Arpad On

Apparently your events are destroyed. Maybe they were attached to HTML tags that were deleted and recreated. Instead of adding the events inside a parameter, you could download the file via AJAX, so your Javascript events will not break and will trigger successfully even afterwards.