javascript - 创建小部件时出现 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>
解决方案
推荐阅读
- c++ - 如何将向量分成五分位数
- html - html boostrap navbrand 图像标志问题
- azure-storage - 复制数据时如何避免powershell提示消息
- javascript - 在客户端格式化 REST 响应
- c++ - C++ 如果条件不起作用
- javascript - Javascript如何深度克隆其中包含对象的多维数组?
- vba - 什么属性会将插入符号(或光标类型栏)返回到 VBA Excel 用户窗体中的指定文本框?
- python-3.x - 如何确保 pandas.DataFrame.to_csv 立即刷新
- php - PHP:字符串自动转换为浮点数并给出负数
- json - 使用 jq 提取对 shell 变量的 json 响应