2009-12-02 62 views

回答

0

您可以使用jQuery的qtip插件此。在我的情況下,當特定的jqgrid單元格聚焦時,我必須顯示工具提示。

LoadToolTipRackId = function (elem) { 

    jQuery(elem).qtip({ 
     content: 'this is an image', 
     show: 'focusin', 
     hide: 'focusout', 
     style: 
    { 

     name: 'red', 
     tip: 'leftBottom', 
     textAlign: 'left', 
     fontWeight: '500', 
     fontSize: '11px' 

    }, 
     position: 
    { 
     corner: 
     { 
      target: 'rightMiddle', 
      tooltip: 'leftBottom' 
     } 
    } 
    }); 
} 

,您可以訪問以下鏈接,瞭解更多關於qtip插件 http://craigsworks.com/projects/qtip/

,而我必須設置在colmodel中的jqGrid以下列屬性

editoptions: { size: 7, defaultValue: '0.00000', maxlength: 15, dataInit: LoadToolTipRackId}