2013-08-16 110 views
10

我有由jquery填充的gridview。下面是我的代码部分那给上述错误:

var codes = $(this).find("Code").text(); 

$("td", row).eq(6).html($(this).find("oTotal").text()); 
      if ($(this).find("Stock").text() == 'Y') { 

       $("td", row).eq(7).html('<a href="#" class="tooltip" title="This is my divs tooltip message!" id="' + codes + '" style="text-decoration:none">Y</a>'); 

       $('#' + codes).live('click', function() { 
        $('#' + codes).tooltip(); 

       }); 
      } 
      else { 
       $("td", row).eq(7).html($(this).find("Stock").text()); 
      } 

我正在上$)错误(“#” +代码).tooltip(;我有jquery.ui/1.8.22和jquery/1.8.3。

+0

你究竟需要一个..? –

+1

你确定你包含工具提示组件在你的jQuery UI的装载? –

+0

是的,我做到了。我用这个CDN http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.22/jquery-ui.js –

回答

2

我通过移动所有我的JavaScript解决了这个问题上面的标签:

< jdoc:include type="head" /> 

希望它也适用于你。

0

tooltip()不是功能!!!

我解决了这个问题,使用下面的步骤角4

安装jquery使用,npm install jquery命令。

将以下代码添加到路径src/typings.d.ts文件中。

declare var jquery:any; 

interface jquery 
{ 
tooltip(options?:any):any; 
} 

它解决了tooltip()问题。

相关问题