Javascript Dojo:工具提示延迟
使用以下代码附加Dojo工具提示元素:Javascript Dojo:工具提示延迟,javascript,css,dojo,Javascript,Css,Dojo,使用以下代码附加Dojo工具提示元素: new Tooltip({ connectId: 'app-container', selector: '*', position: ['above-centered', 'after'], getContent: function(matchedNode){ return matchedNode.getAttribute('tooltipText'); } }); 然后使用以下代码设置工具提示文本
new Tooltip({
connectId: 'app-container',
selector: '*',
position: ['above-centered', 'after'],
getContent: function(matchedNode){
return matchedNode.getAttribute('tooltipText');
}
});
然后使用以下代码设置工具提示文本:
<span class="tag" tooltipText="Show tests tagged 'workforce'">Workforce</span>
但这不起作用。也没有任何信息
有没有办法消除这种延迟?页面上确实有信息。默认情况下,
showDelay
为400ms。您可以通过传递自己的值来更改它
而且,据我所知,您的代码中存在一些问题。您需要在tooltip
对象中传递尚未传递的工具提示文本。请参阅小提琴(下面的链接)
看看这个。
showDelay
工作起来很有魅力。其他一切(包括文本)似乎都很好。
-webkit-animation-duration: 0s !important;
animation-duration: 0s !important;
new Tooltip({
connectId: 'app-container',
selector: '*',
showDelay: 0,
position: ['above-centered', 'after'],
getContent: function(matchedNode){
return matchedNode.getAttribute('tooltipText');
}
});