0
tooltipster在.XHTML文件這個jQuery tooltipster工作正常XML命名空間打破了XHTML
<?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>
,直到我添加<t:body></t:body>
HTML正文裏面,</span>
後。工具提示出現在懸停中,但不會消失。
那<t:body>
應該沒關係。 t:body
位於不同的命名空間中! (沒關係,對不對?)
如果我將t:body
更改爲t:bod
,或者如果將文件名從.xhtml更改爲.html,則問題消失。 (我正在使用深淵網頁服務器。)
這是怎麼回事?我該如何做這項工作?此應用程序廣泛使用XHTML中的命名空間,以及名稱空間元素 - 如<body>
- 在HTML命名空間中具有含義。
這似乎是Tooltipster現在正在研究中的一個問題。 https://github.com/iamceege/tooltipster/issues/655 – JPM
這已在Tooltipster 4.1.8中修復。 – JPM