开发者

jQuery Tools Tooltip hover not detected after link click

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 any开发者_开发百科one have an idea why after clicking in a link the tooltip the mouseenter and mouseleave events as defined do not register anymore?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜