Streaming live at 10am (PST)

Webflow.js and jQuery.noConflict()


#1

When using a webflow export in a CMS that already provides the jquery library and it is frowned upon to link externally or provide a different version of jquery, how does one go about getting around the issue when the jquery library by the CMS removes references to the $ alias using noConflict?

I've tried wrapping webflow.js within a doc ready as well as an anonymous function that redeclares the $ alias but I still get errors.


#2

lol, boy I feel stupid.

var $ = jQuery;


#3

On a daily basis (: Is this auto solved?


#4

Not sure what you mean by auto solved but yeah I was definitely over-complicating the situation and I'm still not sure that's the best approach but it works. I simply add that line just before:

var Webflow = { w: Webflow };

in webflow.js. Found a good read here http://sundropsoftware.com/how-to-use-jquery-noconflict-the-right-way/


#5