Jquery $(…)。intercode不是一个函数Phone.js
我在Wordpress网站上使用的JS插件called Phone.JS有问题。我在加载jQuery后包含了脚本。这是我用来触发添加phone字段的代码:Jquery $(…)。intercode不是一个函数Phone.js,jquery,wordpress,plugins,typeerror,compatibility,Jquery,Wordpress,Plugins,Typeerror,Compatibility,我在Wordpress网站上使用的JS插件called Phone.JS有问题。我在加载jQuery后包含了脚本。这是我用来触发添加phone字段的代码: <code><script type="text/javascript"> jQuery(document).ready(function( $ ) { $('.phone').intercode({ country: 'CA', selectClass: 'coun
<code><script type="text/javascript">
jQuery(document).ready(function( $ ) {
$('.phone').intercode({
country: 'CA',
selectClass: 'countryCodeselect left',
intercodeFile: './js/countrycodes.json'
});
});
</script></code>
jQuery(文档).ready(函数($){
$(“.phone”).intercode({
国家:'CA',
selectClass:'countryCodeselect left',
intercompile:“./js/countrycodes.json”
});
});
这是我在加载页面时收到的错误:Uncaught TypeError: $(...).intercode is not a function 未捕获的TypeError:$(…)。intercode不是函数 这个问题发生在phone.js和intlTelInput.min.js上,因此它不是特定于一个插件的
任何建议都很好
感谢您回答我的问题,我发现我的集成出了什么问题。
文件正在加载,但顺序不正确,这使我的脚本无法使用加载的插件功能。
我设法解决了问题,现在电话字段显示正确。
谢谢