jejacks0n/mercury

jQuery Error when including mercury.js - Rails4

SH4DY opened this issue · 0 comments

Greetings,
I managed to install and configure Mercury with my Rails 4 app but now I realized that some of my jQuery content stopped working because when I require the mercury.js I get this error

Uncaught TypeError: Object function (a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
a)};
b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};
c=new c;c.options=b.extend(true,{},c.options);
b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);
b.widget.bridge(a,b[e][a])} has no method 'extend' 

I import it as follow

#= require ../../../vendor/assets/javascripts/mercury.js

Even when I just attach it to the js.coffee of another view (not the one I need Mercury in) I get the error and jQuery stopps working properly. Only when I take it out completely the error goes away.

Any suggestions?

EDIT: I removed the import completely, the error is gone but Mercury (including my custom jquery mercury:saved config) keeps working? I dont get that^^


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.