Jquery Turbolink Ruby on Rails 4 Heroku

Jquery Turbolink Ruby on Rails 4 Heroku,jquery,ruby-on-rails,ruby-on-rails-4,turbolinks,Jquery,Ruby On Rails,Ruby On Rails 4,Turbolinks,我在localhost中对Roundout.js的问题正常,但当我推到heroku时,它不工作。在我的应用程序上,只有这个js不工作。 我试着把页面:加载但不工作,也许我做错了什么 这是rounabout.js ** *jQuery环岛-v1.1 * http://fredhq.com/projects/roundabout/ * *将启用的有序和无序列表的列表项移动到长 *选择的道路。包括默认的懒散路径,即 *在旋转的转盘上移动项目。 * *使用条款//jQuery环岛 * *BSD许可下

我在localhost中对Roundout.js的问题正常,但当我推到heroku时,它不工作。在我的应用程序上,只有这个js不工作。 我试着把页面:加载但不工作,也许我做错了什么 这是rounabout.js

** *jQuery环岛-v1.1 * http://fredhq.com/projects/roundabout/ * *将启用的有序和无序列表的列表项移动到长 *选择的道路。包括默认的懒散路径,即 *在旋转的转盘上移动项目。 * *使用条款//jQuery环岛 * *BSD许可下的开源 * *版权C 2010,Fred LeBlanc *版权所有。 * *以源代码和二进制形式重新分发和使用,带或不带 *如果满足以下条件,则允许进行修改: * *-源代码的重新分发必须保留上述版权 *请注意,此条件列表和以下免责声明。 *-二进制形式的再分配必须复制上述内容 *版权声明、本条件清单和以下内容 *提供的文件和/或其他材料中的免责声明 *与分布。 *-作者姓名及其贡献者姓名 *可用于支持或推广由此衍生的产品 *未经事先书面许可的软件。 * *本软件由版权所有者和贡献者按原样提供 *以及任何明示或暗示的保证,包括但不限于 *对适销性和特定用途适用性的默示保证 *拒绝承认。在任何情况下,版权持有人或贡献者均不得 *对任何直接、间接、附带、特殊、示范或 *间接损害,包括但不限于采购 *替代货物或服务;使用、数据或利润的损失;还是生意 *无论是何种原因造成的中断,以及基于任何责任理论的中断,无论是在 *合同、严格责任或侵权行为,包括疏忽或其他 *因使用本软件而产生的任何后果,即使 *这种损害的可能性。 */ //创建用于路径的默认形状 jQuery.extend{ 环形交叉口形状:{ def:‘懒散的苏珊’, 懒散的苏珊:函数,a,t{ 返回{ x:Math.sinr+a, y:Math.sinr+3*Math.PI/2+a/8*t, z:Math.cosr+a+1/2, 比例:Math.sinr+Math.PI/2+a/2+0.5 }; } } }; jQuery.fn.roundout=函数{ 变量选项=参数类型[0]!=“对象”?{}:参数[0]; //设置选项并填写默认值 选项={ 方向角:选项的类型。方向角==“未定义”?0.0:jQuery.roundout\u-toflotoptions.bearing%360.0, tilt:typeof options.tilt==“未定义”?0.0:jQuery.roundout\u toflotoptions.tilt, minZ:typeof options.minZ==“未定义”?100:parseIntoptions.minZ,10, maxZ:typeof options.maxZ==“未定义”?400:parseIntoptions.maxZ,10, minOpacity:typeof options.minOpacity==“未定义”?0.40:jQuery.roundout\u toflotoptions.minOpacity, maxOpacity:typeof options.maxOpacity==“未定义”?1.00:jQuery.roundout\u toflotoptions.maxOpacity, minScale:typeof options.minScale==“未定义”?0.40:jQuery.roundout\u toflotoptions.minScale, maxScale:typeof options.maxScale==“未定义”?1.00:jQuery.roundout\u toflotoptions.maxScale, 持续时间:选项的类型。持续时间==“未定义”?600:parseIntoptions.duration,10, btnNext:options.btnNext | | null, btnPrev:options.btnPrev | | null, 放松:选项。放松| |“摆动”, clickToFocus:options.clickToFocus!==false, focusBearing:typeof options.focusBearing==“未定义”?0.0:jQuery.roundout\u-toflotoptions.focusBearing%360.0, shape:options.shape | | lazyssusan', 调试:options.debug | | false, childSelector:options.childSelector | | li', startingChild:typeof options.startingChild==“未定义”?null:ParseInOptions.startingChild,10, reflect:typeof options.reflect==“未定义”| | options.reflect===false?false:true }; //分配 这是每个函数{ var ref=jQuerythis; var period=jQuery.roundout\u toFloat360.0/ref.childrenoptions.childSelector.length; var startingBearing=options.startingChild==null?options.bearing:options.startingChild*期间; //设置起始样式 裁判 .addClass“环形交叉口持有人” .css“填充”,0 .css“位置”、“相对” .css'z-index',options.minZ; //设置启动选项 参考数据“环岛”{ “轴承”:起动轴承, “tilt”:options.tilt, “minZ”:options.minZ, “maxZ”:options.maxZ, “产能不足”:选项。产能不足, “maxOpacity”:options.maxOpacity, “minScale”:options.minScale, “maxScale”:options.maxScale, “持续时间”:options.duration, “缓解”:选项。缓解, “clickToFocus”:选项。clickToFocus, “focusBearing”:options.focusBearing, “动画制作”: 0, “childInFocus”:-1, “形状”:options.shape, "期间":期间,, “调试”:options.debug, “childSelector”:options.childSelector, “反射”:options.reflect }; //绑定单击事件 如果options.clickToFocus==true{ 参考childrenoptions.childSelector.eachfunction i{ jQuerythis.clickfunction{ 变量度=选项。反射===真?360.0-周期*i:周期*i; 度=jQuery.roundout\u toFloatdegrees; 如果!jQuery.roundound\u isInFocusref,度{ e、 防止违约; 如果参考数据为“环岛”。动画===0{ 参考环形交叉口\u动画和聚焦范围; } 返回false; } }; }; } //绑定下一步按钮 if options.btnNext{ jQueryoptions.btnNext.bind'click.roundout',函数e{ e、 防止违约; 如果参考数据为“环岛”。动画===0{ 参考环岛_animateToNextChild; } 返回false; }; } //绑定以前的按钮 if options.btnPrev{ jQueryoptions.btnPrev.bind'click.roundout',函数E{ e、 防止违约; 如果参考数据为“环岛”。动画===0{ 参考环岛\u动画前一个孩子; } 返回false; }; } }; //生孩子 这是一个环形交叉路口; //准备好后回拨 如果参数类型[1]=“函数”{ var callback=arguments[1],ref=this; setTimeoutfunction{callbackref;},0; } 归还这个; }; jQuery.fn.roundout\u startChildren=函数{ 这是每个函数{ var ref=jQuerythis; var数据=参考数据“环岛”; var children=ref.childrendata.childSelector; 儿童功能{ 变量度=data.reflect==真?360.0-data.period*i:data.period*i; //首先应用类和css jQuerythis .addClass“环形交叉口-可移动项目” .css‘位置’、‘绝对’; //然后测量 jQuerythis.data'roundout'{ 'startWidth':jQuerythis.width, “startHeight”:jQuerythis.height, 'startFontSize':parseIntjQuerythis.css'font-size',10, “度”:度 }; }; 参考环行交叉口\更新车位; }; 归还这个; }; jQuery.fn.roundout_setTilt=函数newtilt{ 这是每个函数{ jQuerythis.data'roundout'.tilt=newTilt; jQuerythis.roundout_updateChildPositions; }; 如果参数类型[1]=“函数”{ var callback=arguments[1],ref=this; setTimeoutfunction{callbackref;},0; } 归还这个; }; jQuery.fn.roundout\u setBearing=函数newbearing{ 这是每个函数{ jQuerythis.data'roundout'.bearing=jQuery.roundout\u toFloatnewBearing%360,2; jQuerythis.roundout_updateChildPositions; }; 如果参数类型[1]=“函数”{ var callback=arguments[1],ref=this; setTimeoutfunction{callbackref;},0; } 归还这个; }; jQuery.fn.roundout\u adjustBearing=functiondelta{ delta=jQuery.roundout\u toFloatdelta; 如果增量!==0{ 这是每个函数{ jQuerythis.data'roundout'.bearing=jQuery.roundout\u getBearingjQuerythis+delta; jQuerythis.roundout_updateChildPositions; }; } 如果参数类型[1]=“函数”{ var callback=arguments[1],ref=this; setTimeoutfunction{callbackref;},0; } 归还这个; }; jQuery.fn.roundout\u adjustTilt=functiondelta{ delta=jQuery.roundout\u toFloatdelta; 如果增量!==0{ 这是每个函数{ 数据'roundout'.tilt=jQuery.roundout\u toFloatjQuerythis.roundout\u获得'tilt'+delta; jQuerythis.roundout_updateChildPositions; }; } 如果参数类型[1]=“函数”{ var callback=arguments[1],ref=this; setTimeoutfunction{callbackref;},0; } 归还这个; }; jQuery.fn.roundout\u animateToBearing=函数轴承{ 轴承=jQuery.roundout\豆腐渣轴承; var currentTime=新日期; 变量持续时间=参数类型[1]=“未定义”?空:参数[1]; var easingType=typeof arguments[2]=“undefined”?null:arguments[2]; var passedData=typeof arguments[3]!=“object”?null:arguments[3]; 这是每个函数{ var ref=jQuerythis,data=ref.data‘环岛’、定时器、测量fn、新轴承; var thisDuration=持续时间===null?数据。持续时间:持续时间; var thisEasingType=easingType!==null?easingType:data.easing | | |“swing”; 如果passedData==null{ 通过数据={ timerStart:currentTime, 开始:jQuery.roundout\u getBearingref, totalTime:thisDuration }; } 计时器=currentTime-passedData.timerStart; 如果计时器<此持续时间{ data.animating=1; 如果jQuery.easing.def的类型=='string'{ easingFn=jQuery.easing[thisEasingType]| | jQuery.easing[jQuery.easing.def]; 新轴承=easingFnnull,定时器,passedData.start,轴承-passedData.start,passedData.totalTime; }否则{ newBearing=jQuery.easing[thisEasingType]timer/passedData.totalTime,timer,passedData.start,bearing-passedData.start,passedData.totalTime; } ref.ROUNDOWN\U设置新轴承,功能{ref.rou ndaabout_animateToBearingbearing,thisDuration,thisEasingType,passedData;}; }否则{ 轴承=轴承<0?轴承+360:轴承%360; data.animating=0; 参考环形交叉口轴承; } }; 归还这个; }; jQuery.fn.roundound\u animateToDelta=functiondelta{ 变量持续时间=参数[1],缓和=参数[2]; 这是每个函数{ delta=jQuery.roundaound\u getBearingjQuerythis+jQuery.roundaound\u toFloatdelta; jQuerythis.roundou动画承载三角洲、持续时间、缓和度; }; 归还这个; }; jQuery.fn.roundout_animateToChild=函数childpos{ 变量持续时间=参数[1],缓和=参数[2]; 这是每个函数{ var ref=jQuerythis,data=ref.data‘环岛’; 如果data.childInFocus!==childPos&&data.animating==0{ var child=jQueryref.childrendata.childSelector[childPos]; 参考环形交叉口\u animateAngleToFocuschild.数据“环形交叉口”。度数、持续时间、缓和度; } }; 归还这个; }; jQuery.fn.roundout\u animateToNearbyChild=函数passedArgs,其中{ var持续时间=经过的基准[0],缓和=经过的基准[1]; 这是每个函数{ var data=jQuerythis.data'roundout'; var bearing=jQuery.roundout\u toFloat360.0-jQuery.roundout\u getBearingjQuerythis; var期间=数据期间,j=0,范围; var reflect=data.reflect; var length=jQuerythis.childrendata.childSelector.length; 轴承=反射===真实?轴承%360.0:轴承; 如果data.animating==0{ //如果我们不反思,我们要走到下一步或下一步 //我们正在反思,我们正在向前迈进 如果反射===false&&which=='next'| |反射===true&&which!=='next'{ 轴承=轴承===0?360:轴承; //逆时针 而true&&j<长度{ range={lower:jQuery.roundout\u-toFloatperiod*j,lower:jQuery.roundout\u-toFloatperiod*j+1}; range.upper=j==length-1?360.0:range.upper;//调整javascript是否不适合浮动 如果轴承范围较低{ jQuerythis.roundabound\u animateToDeltabearing-range.lower,duration,easing; 打破 } j++; } }否则{ //顺时针 虽然是真的{ range={lower:jQuery.roundout\u-toFloatperiod*j,lower:jQuery.roundout\u-toFloatperiod*j+1}; range.upper=j==length-1?360.0:range.upper;//调整javascript是否不适合浮动 如果轴承>=range.lower和轴承180?-360.0-δ:δ; 如果增量!==0{ jQuerythis.roundabound_animatetodeltadata,持续时间,缓和; } }; 归还这个; }; jQuery.fn.roundout\u updateChildPositions=函数{ 这是每个函数{ var ref=jQuerythis,data=ref.data‘环岛’; var inFocus=-1; 变量信息={ 方位:jQuery.roundout\u getBearingref, 倾斜:data.tilt, 舞台:{width:Math.floorref.width*0.9,height:Math.floorref.height*0.9}, 动画:数据。动画, inFocus:data.childInFocus, focusBearingRad:jQuery.roundout_degToRaddata.focusBearing, shape:jQuery.roundound_shape[data.shape]| | jQuery.roundound_shape[jQuery.roundound_shape.def] }; info.middstage={width:info.stage.width/2,height:info.stage.height/2}; info.nudge={width:info.middstage.width+info.stage.width*0.05,height:info.middstage.height+info.stage.height*0.05}; info.zValues={min:data.minZ,max:data.maxZ,diff:data.maxZ-data.minZ}; info.opacity={min:data.minOpacity,max:data.maxOpacity,diff:data.maxOpacity-data.minOpacity}; info.scale={min:data.minScale,max:data.maxScale,diff:data.maxScale-data.minScale}; //更新子位置 参考childrendata.childSelector.eachfunctioni{ 如果jQuery.roundout\u updateChildPositionjQuerythis,ref,info,i&&info.animating==0{ inFocus=i; jQuerythis.addClass“聚焦环岛”; }否则{ jQuerythis.removeClass“环岛聚焦”; } }; //更新关注对象的状态 如果inFocus!==info.inFocus{ jQuery.roundout_triggerEventref,info.inFocus,'blur'; 如果inFocus!==-1{ jQuery.roundout_triggerEventref,inFocus,“focus”; } data.childInFocus=inFocus; } }; 归还这个; }; //-------- jQuery .环形交叉口\u getBearing=功能EL{ 返回jQuery.roundout\ toFloatel.data'roundout'。方向角为%360; }; jQuery.roundout_degToRad=函数度{ 返回度%360.0*Math.PI/180.0; }; jQuery.roundout\u isInFocus=functionel,target{ 返回jQuery.roundout\u getBearingel%360==目标%360; }; jQuery.roundout\u triggerEvent=functionel,child,eventType{ 返回child<0?这是:jQueryel.childrenel.data'roundout'。childSelector[child]。triggereventType; }; jQuery.roundout\u toFloat=函数编号{ number=Math.roundparseFloatnumber*1000/1000; 返回parseFloatnumber.toFixed2; }; jQuery.roundout\u updateChildPosition=functionchild,container,info,childPos{ var ref=jQuerychild,data=ref.data'roundout',out=[]; var rad=jQuery.roundout_degToRad360.0-ref.data'roundout'。度+信息方位; //将弧度调整为介于0和Math.PI*2之间 而rad<0{ rad=rad+Math.PI*2; } 而rad>Math.PI*2{ rad=rad-Math.PI*2; } var factors=info.shaperad、info.focusBearingRad、info.tilt;//带有x、y、z和比例值的obj //正确的 factors.scale=factors.scale>1?1:factors.scale; factors.adjusted scale=info.scale.min+info.scale.diff*factors.scale.toFixed4; factors.width=factors.adjusted scale*data.startWidth.toFixed4; factors.height=factors.adjusted scale*data.startHeight.tofixed 4; //更改项 裁判 .css'left',factors.x*info.middstage.width+info.nudge.width-factors.width/2.0.toFixed1+'px' .css'top',factors.y*info.middstage.height+info.nudge.height-factors.height/2.0.toFixed1+'px' .css'width',factors.width+'px' .css'height',factors.height+'px' .css'opacity',info.opacity.min+info.opacity.diff*factors.scale.toFixed2 .css'z-index',Math.roundinfo.zValues.min+info.zValues.diff*factors.z .css“字体大小”,factors.adjustedScale*data.startFontSize.toFixed2+“px” .attr“当前刻度”,因数。调整刻度; 如果container.data'roundout'.debug==true{ 向外推; 推出。推出'Child'+childPos+; out.push'left:'+ref.css'left'+'top:'+ref.css'top'+; out.push'width:'+ref.css'width'+'opacity:'+ref.css'opacity'+; out.push'z-index:'+ref.css'z-index'+'字体大小:'+ref.css'font-size'+; 向外推“刻度:”+ref.attr“当前刻度”; 向外推; 参考htmlout.join; } 返回jQuery.roundout\u isInFocuscontainer,ref.data'roundout'。度;
};在我的页面上,在devkit chrome的脚本中,我有/jQuery…我在我的应用程序中添加//=require roundout.js时发现Roundout不是一个函数。我在localhost jQuery上也有相同的错误…Roundout不是一个函数,所以我认为这是一个问题,我不知道如何修复这个错误我在我的应用程序中有2个js,因此有一些错误问题我有tride add jQuery.noConflict;到roundout.js