编辑:
问题似乎是window.jQuery.fn.jquery < "1.4.2"
返回 false'1.10.2' < '1.4.2'
也会返回 false。这是因为 javascript 会将其视为1.1.2 < 1.4.2
. 另一种选择是删除|| window.jQuery.fn.jquery < "1.4.2"
如果您确定要包含 jQuery,只需更改附加脚本标记的代码部分。
在脚本的底部。改变
// function that starts it all. timeout is 0
(function() {
// these are the domains whose js files we're going to look at
// intuit.ipp.ourDomain = /(.intuit.com).*?#(.*)/;
intuit.ipp.ourDomain = /intuit.com$/;
if(window.jQuery === undefined || window.jQuery.fn.jquery < "1.4.2") {
// minimum version 1.4.2
var script_tag = document.createElement('script');
script_tag.setAttribute("type","text/javascript");
script_tag.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js");
script_tag.onload = function () {
if(window.jQuery) {
intuit.ipp.jQuery = window.jQuery.noConflict(true);
intuit.ipp.anywhere.windowLoad();
}
};
script_tag.onreadystatechange = function () { // Same thing but for IE
if (this.readyState == 'complete' || this.readyState == 'loaded') {
script_tag.onload();
}
};
// Try to find the head, otherwise default to the documentElement
(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag);
} else {
// we do have jquery
intuit.ipp.jQuery = window.jQuery;
intuit.ipp.anywhere.windowLoad();
}
})();
至
// function that starts it all. timeout is 0
(function () {
// these are the domains whose js files we're going to look at
// intuit.ipp.ourDomain = /(.intuit.com).*?#(.*)/;
intuit.ipp.ourDomain = /intuit.com$/;
// we do have jquery
intuit.ipp.jQuery = window.jQuery;
intuit.ipp.anywhere.windowLoad();
})();