2013-08-16 108 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()問題。

相關問題