首页 > 解决方案 > 创建小部件时出现 jQuery 错误 Uncaught TypeError: self.addNews is not a function

问题描述

我得到:Uncaught TypeError: self.addNews is not a function,在下面的代码片段中......这是上周工作的,我不知道为什么现在它不工作......

<html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
  <div style="width: 700px; height: 500px;">
    <div class="mxport-news"><img class="spinner" src="http://noticiasintegrace.solucionesgp.com/news-widget/img/ellipsis.svg"></div>
  </div>

  <script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
  <script src="http://noticiasintegrace.solucionesgp.com/news-widget/widget.js"></script>
  <script>
    new Mexicoxport.NewsWidget($('div.mxport-news'));
  </script>
</body>
</html>

标签: javascriptjquerywidget

解决方案


推荐阅读