English 中文(简体)
qtip2 没有标题栏的关闭按钮
原标题:qtip2 close button without a title bar
  • 时间:2012-05-25 17:44:40
  •  标签:
  • qtip2

我希望有一个没有标题栏的 qtip2 工具提示, 但是在角落里有一个很近的图标 。 是否有一种方法可以检查这一点, 或者我必须使用创建它的代码吗? 我在想一些东西, 将按钮向左或向右浮动, 允许其余内容填充工具提示 div 。

问题回答

总是将关闭标记分开, 并使用当前 qTip Text 更新 。

$( .selector ).qtip({
    content: {
        text: function(api) {
          var qTipContent = $( .close-markup ).html();
          qTipContent += $( .qtip-content ).html();
          return $( .qtip-content ).html();
        }
    }
});
$( .close-markup ).qtip( destroy );

试试上面的代码

注意: 不需要将 qTip 关闭代码片段混为一谈!





相关问题
qTip2 inside iframe detect mouseenter & mousemove

I have a dynamically loaded iframe. I want the qtips to show when the user hover over certain elements and the qtips will follow the cursor once inside the element. I can t use the option target: ...

qTip2 within an iFrame

I am using jQuery qTip2 within an iframe but since I am restricted to the size of the iframe width and height, is there anyway I could have the content actually appear on top of the iframe, i.e. ...

jQuery qTip 2 open only the required qTip on focus

I got many qtips in a form with lets like this : $( .selector ).qtip({ content: { text: function(api) { // Retrieve content from custom attribute of the $( .selector ) elements. ...

jQuery Validate Framework + qTip not firing on submit

Hereunder, I m trying to use jQuery Validate Framework with qTip 2.0. This is working in Chrome but not in IE9, any ideas? <html> <head> <script src="http://ajax.googleapis.com/...

jquery qtip2 - multiple qtips for same target?

I am using the jquery qtip2 to create a mouseover qtip..here is the code: $(document).ready(function() { $("#optionalProdsImgPreview_1").qtip({ content: "<img src= http://mysite.com/myimg....

热门标签