Webflow.js and jQuery.noConflict()

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.

lol, boy I feel stupid.

var $ = jQuery;

On a daily basis (: Is this auto solved?

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 sundropsoftware.com - This website is for sale! - sundropsoftware Resources and Information.

1 Like