TypeError: $(…).tooltip is not a function

后端 未结 4 1025
日久生厌
日久生厌 2020-12-06 11:51

I have gridview that is populated by jquery. Below is part of my code thats giving the above error:

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

 $(\"td\", ro         


        
相关标签:
4条回答
  • 2020-12-06 12:04

    tooltip() is not a function!!!

    I solved the problem by using below steps in angular 4.

    install jquery using, npm install jquery command.

    add the following code in the path src/typings.d.ts file.

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

    It solved the tooltip() issue.

    0 讨论(0)
  • 2020-12-06 12:05

    I think tooltip wasn't part of the file you are pulling in. Are you able to update your CDN reference to jQuery UI to:

    http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js

    0 讨论(0)
  • 2020-12-06 12:10

    I solved this problem by moving all my Javascript tags above:

    < jdoc:include type="head" />
    

    Hope it works for you too.

    0 讨论(0)
  • 2020-12-06 12:10

    The tooltip is the part of Bootstrap so including bootstrap should solve the problem.

    Quick links to check with bootstrap, you may remove https: from the beginning of the bootstrap links.

    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
    
    0 讨论(0)
提交回复
热议问题