2013-04-23 38 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) }