【问题标题】:XML namespace breaks tooltipster with XHTMLXML 命名空间使用 XHTML 破坏工具提示器
【发布时间】:2017-02-11 03:08:09
【问题描述】:

这个 .XHTML 文件中的 jQuery 工具提示器工作正常

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:t="http://www.tei-c.org/ns/1.0" >
<head>
<title>Sandbox</title>
        <link rel="stylesheet" type="text/css" href="tooltipster.bundle.css" />
        <link rel="stylesheet" type="text/css" href="tooltipster-sideTip-light.min.css" />
        <script type="text/javascript" src="http://code.jquery.com/jquery-3.1.0.min.js"></script>
        <script type="text/javascript" src="tooltipster.bundle.min.js"></script>
        <script>$(document).ready(function() {
            $('.tooltip').tooltipster({ 
                functionInit: function(instance, helper) {
                    var content = $(helper.origin).children().detach();
                    instance.content(content);              
                }
            })
        });</script>
</head>
<body>

<span class="tooltip">Hover here.
    <p>Red</p>
    <p>Green</p>
    <p>Blue</p>
</span>

</body>
</html>

直到我在 HTML 正文中添加 &lt;t:body&gt;&lt;/t:body&gt;,在 &lt;/span&gt; 之后。工具提示出现在悬停时,但不会消失。

&lt;t:body&gt; 应该无关紧要。 t:body 位于不同的命名空间中! (应该没关系吧?)

如果我将 t:body 更改为 t:bod 或将文件名从 .xhtml 更改为 .html,问题就会消失。 (我使用的是深渊网络服务器。)

发生了什么事?我怎样才能使这项工作?此应用广泛使用 XHTML 中的命名空间,以及在 HTML 命名空间中有意义的命名空间元素(如 &lt;body&gt;)。

【问题讨论】:

标签: jquery tooltipster


【解决方案1】:

这是 Tooltipster 中的一个问题。它已在 4.1.8 中修复。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多