jQuery Uncaught TypeError:对象[对象窗口]的属性'$'不是函数
全部,我下载了一个预先绑定的JS / CSS表单应用程序,我正在尝试在Wordpress中使用它。我有以下代码:
$(document).ready(function () {/*----------------------------------------------------------------------*//* Parse the data from an data-attribute of DOM Elements /*----------------------------------------------------------------------*/$.parseData = function (data, returnArray) { if (/^\[(.*)\]$/.test(data)) { //array data = data.substr(1, data.length - 2).split(','); } if (returnArray && !$.isArray(data) && data != null) { data = Array(data); } return data;};/*----------------------------------------------------------------------*//* Image Preloader /* http://engineeredweb.com/blog/09/12/preloading-images-jquery-and-javascript /*----------------------------------------------------------------------*/// Arguments are image paths relative to the current page.$.preload = function() { var cache = [], args_len = arguments.length; for (var i = args_len; i--;) { var cacheImage = document.createElement('img'); cacheImage.src = arguments[i]; cache.push(cacheImage); }};/*----------------------------------------------------------------------*//* fadeInSlide by revaxarts.com /* Fades out a box and slide it up before it will get removed /*----------------------------------------------------------------------*/$.fn.fadeInSlide = function (speed, callback) { if ($.isFunction(speed)) callback = speed; if (!speed) speed = 200; if (!callback) callback = function () {}; this.each(function () { var $this = $(this); $this.fadeTo(speed / 2, 1).slideDown(speed / 2, function () { callback(); }); });
我假设Wordpress没有冲突导致问题,所以我更新了最后一个括号,如下所示:
}, "jQuery");
但是,我仍然遇到同样的错误。有谁知道会出现什么问题以及如何解决这个问题?
提前致谢!
慕盖茨4494581
德玛西亚99
森栏
相关分类