2012-06-06 46 views

回答

0

最後我明白了! :)

以下是如何通過q​​tip2更改fn-gantt-hint。打開js文件並搜索;

if (desc) 
{ 
    bar 
... 
} 
return bar; 

然後刪除或只是評論這個;

.mouseover(function(e){ 
    var hint = $("<div class='fn-gantt-hint' />").html(desc); 
    $("body").append(hint); 
    hint.css('left', e.pageX); 
    hint.css('top', e.pageY); 
    hint.show(); 
    }) 
    .mouseout(function(){ 
    $(".fn-gantt-hint").remove(); 
    }) 
    .mousemove(function(e){ 
    $('.fn-gantt-hint').css('left', e.pageX); 
    $('.fn-gantt-hint').css('top', e.pageY+15); 
}); 

與此;

bar.qtip({ 
    content: desc, 
    position: { 
     my: 'top left', 
     target: 'mouse', 
     viewport: $(window), // Keep it on-screen at all times if possible 
     adjust: { 
      x: 10, y: 10 
     } 
    }, 
    hide: { 
     fixed: true // Helps to prevent the tooltip from hiding ocassionally when tracking! 
    }, 
    style: 'ui-tooltip-shadow' 
}); 

然後你完成了! :)乾杯!一個有qtip2的甘特圖!通過分享插件和qtip2,向mbielanczuk信用!我愛你們! :))