2013-04-23 42 views
0

我有QTips:让QTip工具提示脱离屏幕? (绑定到身体?)

eventRender: function (event, element, view) { 
    element.qtip({ 
     content: event.title + event.hours, 
     position:{ 
      target: 'mouse' 
     }, 
     // show: { event: 'click' }, 
     hide: { event: 'mousedown mouseleave' }, 
     style: { 
      width: 200, 
      padding: 5, 
      color: 'black', 
      textAlign: 'left', 
      border: { 
       width: 1, 
       radius: 3 
      }, 
      classes: 'custSideTip' 
     } 
    }); 
} 

CSS:

.custSideTip 
{ 
    position:fixed !important; 
    right:0 !important; 
    max-width:200px !important; 
} 

enter image description here

但他们熄灭的网页...

我试图向右固定的位置,似乎没有任何工作...

尖端的右侧坐标绝不能超过body.right/page.right ......如果是有道理的..

感谢

回答

5

here服用。

你可以尝试使用viewport配置:

position: { viewport: $(window) } 
+2

新位置:http://qtip2.com/plugins#viewport – MECU 2014-03-13 21:29:12

1

这个工作对我和其他的例子并没有与jQuery的代码中的一些错误。也许有些版本差异?

position: { viewport: $(document.body) }