我想在我的Rails网站上使用jQuery-Boxer插件(http://www.benplum.com/formstone/boxer/#),但我不断收到.boxer()未定义的错误。为了跟踪问题,我将生成的Rails页面复制到一个纯HTML页面中,逐渐删除行,直到插件开始工作。
我发现问题出在application.js上,特别是在行
中!function(e,t){function n(e){var t=e.length,n=ct.type(e);return ct.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Nt[e]={};return ct.each(e.match(pt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(ct.acceptData(e)){var o,a,s=ct.expando,u=e.nodeType,l=u?ct.cache:e,c=u?e[s]:e[s]&&s;if(c&&l[c]&&(i||l[c].data)||r!==t||"string"!=typeof n)return c||(c=u?e[s]=tt.pop()||ct.guid++:s),l[c]||(l[c]=u?{}:{toJSON:ct.noop}),("object"==typeof n||"function"==typeof n)&&(i?l[c]=ct.extend(l[c],n):l[c].data=ct.extend(l[c].data,n)),a=l[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[ct.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[ct.camelCase(n)])):o=a,o}}function o(e,t,n){if(ct.acceptData(e)){var r,i,o=e.nodeType,a=o?ct.cache:e,u=o?e[ct.expando]:ct.expando;if(a[u]){if(t&&(r=n?a[u]:a[u].data)){ct.isArray(t)?t=t.concat(ct.map(t,ct.camelCase)):t in r?t=[t]:(t=ct.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!s(r):!ct.isEmptyObject(r))return}(n||(delete a[u].data,s(a[u])))&&(o?ct.cleanData([e],!0):ct.support.deleteExpando||a!=a.window?delete a[u]:a[u]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(St,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:Et.test(r)?ct.parseJSON(r):r}catch(o){}ct.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!ct.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(){try{return G.activeElement}catch(e){}}function f(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function p(e,t,n){if(ct.isFunction(t))return ct.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ct.grep(e,function(e){return e===t!==n});if("string"==typeof t){if($t.test(t))return ct.filter(t,e,n);t=ct.filter(t,e)}return ct.grep(e,function(e){return ct.inArray(e,t)>=0!==n})}function d(e){var t=Ut.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){return ct.nodeName(e,"table")&&ct.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function m(e){return e.type=(null!==ct.find.attr(e,"type"))+"/"+e.type,e}function g(e){var t=on.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function y(e,t){for(var n,r=0;null!=(n=e[r]);r++)ct._data(n,"globalEval",!t||ct._data(t[r],"globalEval"))}function v(e,t){if(1===t.nodeType&&ct.hasData(e)){var n,r,i,o=ct._data(e),a=ct._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)ct.event.add(t,n,s[n][r])}a.data&&(a.data=ct.extend({},a.data))}}function b(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ct.support.noCloneEvent&&t[ct.expando]){i=ct._data(t);for(r in i.events)ct.removeEvent(t,r,i.handle);t.removeAttribute(ct.expando)}"script"===n&&t.text!==e.text?(m(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ct.support.html5Clone&&e.innerHTML&&!ct.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&tn.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function x(e,n){var r,i,o=0,a=typeof e.getElementsByTagName!==Y?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==Y?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||ct.nodeName(i,n)?a.push(i):ct.merge(a,x(i,n));return n===t||n&&ct.nodeName(e,n)?ct.merge([e],a):a}function w(e){tn.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function C(e,t){return e=t||e,"none"===ct.css(e,"display")||!ct.contains(e.ownerDocument,e)}function k(e,t){for(var n,r,i,o=[],a=0,s=e.length;s>a;a++)r=e[a],r.style&&(o[a]=ct._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&C(r)&&(o[a]=ct._data(r,"olddisplay",j(r.nodeName)))):o[a]||(i=C(r),(n&&"none"!==n||!i)&&ct._data(r,"olddisplay",i?n:ct.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function N(e,t,n){var r=vn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function E(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=ct.css(e,n+kn[o],!0,i)),r?("content"===n&&(a-=ct.css(e,"padding"+kn[o],!0,i)),"margin"!==n&&(a-=ct.css(e,"border"+kn[o]+"Width",!0,i))):(a+=ct.css(e,"padding"+kn[o],!0,i),"padding"!==n&&(a+=ct.css(e,"border"+kn[o]+"Width",!0,i)));return a}function S(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=fn(e),a=ct.support.boxSizing&&"border-box"===ct.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=pn(e,t,o),(0>i||null==i)&&(i=e.style[t]),bn.test(i))return i;r=a&&(ct.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+E(e,t,n||(a?"border":"content"),r,o)+"px"}function j(e){var t=G,n=wn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||ct("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(cn[0].contentWindow||cn[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=A(e,t),cn.detach()),wn[e]=n),n}function A(e,t){var n=ct(t.createElement(e)).appendTo(t.body),r=ct.css(n[0],"display");return n.remove(),r}function D(e,t,n,r){var i;if(ct.isArray(t))ct.each(t,function(t,i){n||Sn.test(e)?r(e,i):D(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==ct.type(t))r(e,t);else for(i in t)D(e+"["+i+"]",t[i],n,r)}function L(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(pt)||[];if(ct.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function H(e,t,n,r){function i(s){var u;return o[s]=!0,ct.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===zn;return i(t.dataTypes[0])||!o["*"]&&i("*")}function q(e,n){var r,i,o=ct.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&ct.extend(!0,e,r),e}function F(e,n,r){for(var i,o,a,s,u=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):void 0}function O(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(a=l[u+" "+o]||l["* "+o],!a)for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){a===!0?a=l[i]:l[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function _(){try{return new e.XMLHttpRequest}catch(t){}}function M(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function R(){return setTimeout(function(){Zn=t}),Zn=ct.now()}function B(e,t,n){for(var r,i=(or[t]||[]).concat(or["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,t,e))return r}function P(e,t,n){var r,i,o=0,a=ir.length,s=ct.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Zn||R(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:ct.extend({},t),opts:ct.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Zn||R(),duration:n.duration,tweens:[],createTween:function(t,n){var r=ct.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(W(c,l.opts.specialEasing);a>o;o++)if(r=ir[o].call(l,e,c,l.opts))return r;return ct.map(c,B,l),ct.isFunction(l.opts.start)&&l.opts.start.call(e,l),ct.fx.timer(ct.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function W(e,t){var n,r,i,o,a;for(n in e)if(r=ct.camelCase(n),i=t[r],o=e[n],ct.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=ct.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function $(e,t,n){var r,i,o,a,s,u,l=this,c={},f=e.style,p=e.nodeType&&C(e),d=ct._data(e,"fxshow");n.queue||(s=ct._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--,ct.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===ct.css(e,"display")&&"none"===ct.css(e,"float")&&(ct.support.inlineBlockNeedsLayout&&"inline"!==j(e.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",ct.support.shrinkWrapBlocks||l.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],tr.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(p?"hide":"show"))continue;c[r]=d&&d[r]||ct.style(e,r)}if(!ct.isEmptyObject(c)){d?"hidden"in d&&(p=d.hidden):d=ct._data(e,"fxshow",{}),o&&(d.hidden=!p),p?ct(e).show():l.done(function(){ct(e).hide()}),l.done(function(){var t;ct._removeData(e,"fxshow");for(t in c)ct.style(e,t,c[t])});for(r in c)a=B(p?d[r]:0,r,l),r in d||(d[r]=a.start,p&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function I(e,t,n,r,i){return new I.prototype.init(e,t,n,r,i)}function z(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=kn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function X(e){return ct.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var U,V,Y=typeof t,J=e.location,G=e.document,Q=G.documentElement,K=e.jQuery,Z=e.$,et={},tt=[],nt="1.10.2",rt=tt.concat,it=tt.push,ot=tt.slice,at=tt.indexOf,st=et.toString,ut=et.hasOwnProperty,lt=nt.trim,ct=function(e,t){return new ct.fn.init(e,t,V)},ft=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,pt=/\S+/g,dt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ht=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,mt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,gt=/^[\],:{}\s]*$/,yt=/(?:^|:|,)(?:\s*\[)+/g,vt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,bt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,xt=/^-ms-/,wt=/-([\da-z])/gi,Tt=function(e,t){return t.toUpperCase()},Ct=function(e){(G.addEventListener||"load"===e.type||"complete"===G.readyState)&&(kt(),ct.ready())},kt=function(){G.addEventListener?(G.removeEventListener("DOMContentLoaded",Ct,!1),e.removeEventListener("load",Ct,!1)):(G.detachEvent("onreadystatechange",Ct),e.detachEvent("onload",Ct))};ct.fn=ct.prototype={jquery:nt,constructor:ct,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ht.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof ct?n[0]:n,ct.merge(this,ct.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:G,!0)),mt.test(i[1])&&ct.isPlainObject(n))for(i in n)ct.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=G.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=G,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ct.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),ct.makeArray(e,this))},selector:"",length:0,toArray:function(){return ot.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=ct.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ct.each(this,e,t)},ready:function(e){return ct.ready.promise().done(e),this},slice:function(){return this.pushStack(ot.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(ct.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:it,sort:[].sort,splice:[].splice},ct.fn.init.prototype=ct.fn,ct.extend=ct.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||ct.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(ct.isPlainObject(r)||(n=ct.isArray(r)))?(n?(n=!1,a=e&&ct.isArray(e)?e:[]):a=e&&ct.isPlainObject(e)?e:{},s[i]=ct.extend(c,a,r)):r!==t&&(s[i]=r));return s},ct.extend({expando:"jQuery"+(nt+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===ct&&(e.$=Z),t&&e.jQuery===ct&&(e.jQuery=K),ct},isReady:!1,readyWait:1,holdReady:function(e){e?ct.readyWait++:ct.ready(!0)},ready:function(e){if(e===!0?!--ct.readyWait:!ct.isReady){if(!G.body)return setTimeout(ct.ready);ct.isReady=!0,e!==!0&&--ct.readyWait>0||(U.resolveWith(G,[ct]),ct.fn.trigger&&ct(G).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===ct.type(e)},isArray:Array.isArray||function(e){return"array"===ct.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?et[st.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==ct.type(e)||e.nodeType||ct.isWindow(e))return!1;try{if(e.constructor&&!ut.call(e,"constructor")&&!ut.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(ct.support.ownLast)for(n in e)return ut.call(e,n);for(n in e);return n===t||ut.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||G;var r=mt.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=ct.buildFragment([e],t,i),i&&ct(i).remove(),ct.merge([],r.childNodes))},parseJSON:function(t){return e.JSON&&e.JSON.parse?e.JSON.parse(t):null===t?t:"string"==typeof t&&(t=ct.trim(t),t&>.test(t.replace(vt,"@").replace(bt,"]").replace(yt,"")))?new Function("return "+t)():(ct.error("Invalid JSON: "+t),void 0)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||ct.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&ct.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(xt,"ms-").replace(wt,Tt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s)for(;a>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(s)for(;a>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:lt&&!lt.call(" ")?function(e){return null==e?"":lt.call(e)}:function(e){return null==e?"":(e+"").replace(dt,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?ct.merge(r,"string"==typeof e?[e]:e):it.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(at)return at.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,a=e.length,s=n(e),u=[];if(s)for(;a>o;o++)i=t(e[o],o,r),null!=i&&(u[u.length]=i);else for(o in e)i=t(e[o],o,r),null!=i&&(u[u.length]=i);return rt.apply([],u)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),ct.isFunction(e)?(r=ot.call(arguments,2),i=function(){return e.apply(n||this,r.concat(ot.call(arguments)))},i.guid=e.guid=e.guid||ct.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===ct.type(r)){o=!0;for(u in r)ct.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,ct.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(ct(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),ct.ready.promise=function(t){if(!U)if(U=ct.Deferred(),"complete"===G.readyState)setTimeout(ct.ready);else if(G.addEventListener)G.addEventListener("DOMContentLoaded",Ct,!1),e.addEventListener("load",Ct,!1);else{G.attachEvent("onreadystatechange",Ct),e.attachEvent("onload",Ct);var n=!1;try{n=null==e.frameElement&&G.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!ct.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}kt(),ct.ready()}}()}return U.promise(t)},ct.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){et["[object "+t+"]"]=t.toLowerCase()}),V=ct(G),
似乎与jQuery JavaScript库有关 - 我说“与它有关”因为生成的HTML代码也单独调用jquery.js(我的布局中只包含application.js)。我正在使用jquery-rails gem和Rails 3.2。
发生了什么事?
答案 0 :(得分:0)
您是否将插件文件放在 vendor / 文件夹下?如果没有 - 把它放在那里,别忘了在你的application.js中包含完整的插件文件名(包括扩展名)