2009-12-02 81 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}