所以我的jQuery插件遇到了一些问题。在我的控制台中,它给出了以下错误。我是从谷歌CDN导入jQuery的。我相信这些错误导致我网站上的某些Javascript无法正常运行。
我在任何其他Javascript之前包含我的jQuery Javascript。
请告诉我,如果我能采取任何措施来解决这个问题,谢谢。
在main.js中:
第114行(带有$(' .example-typeahead')的那一行):
var data = ["Afghanistan","Albania","Algeria","American Samoa"];
$('.example-typeahead').typeahead({ items: 5, source: data });
第437行:
uiDemo(); // Initialize Demo Code
第448行:
/* Initialize WebApp when page loads */
$(function(){ webApp.init(); });
在jquery.js中:
jquery.js第7341行的代码(第7341行是以&#34开头的代码; s [s.length] ="):
jQuery.param = function( a, traditional ) {
var prefix,
s = [],
add = function( key, value ) {
// If value is a function, invoke it and return its value
value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
};
// Set traditional to true for jQuery <= 1.3.2 behavior.
if ( traditional === undefined ) {
traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
}
jquery.js第7403行的代码(第7403行是&#34; this.trigger&#34;)
jQuery.fn[ name ] = function( data, fn ) {
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
});
jquery.js第6875行的代码:
// gets hook for the prefixed version
// followed by the unprefixed version
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
jquery.js第6601行的代码(第6601行是删除&#34; elem [internalKey];&#34;):
// IE does not allow us to delete expando properties from nodes,
// nor does it have a removeAttribute function on Document nodes;
// we must handle all of these cases
if ( deleteExpando ) {
delete elem[ internalKey ];
} else if ( typeof elem.removeAttribute !== core_strundefined ) {
elem.removeAttribute( internalKey );
} else {
elem[ internalKey ] = null;
}