Streaming live at 10am (PST)

Adding in JQuery and supporting .Js file


#1

HI All Webflow'ers ,

I wanted to use a third party menu such as this. http://mmenu.frebsite.nl/tutorial/setting-up-the-html.html My question would be how would I add this to a webflow project. I have simply exported the code and hand-coded the setup in a ftp location.

Is there a workaround to be able to add .js files into a project ?


#2

Hop http://help.webflow.com/embedding-code-overview

Also Jquery is supported by Webflow so you don't need to call it.


#3

I am very new to jQuery, so this will probably seem like a very basic question.

When you say, "jQuery is supported by Webflow so you don't need to call it", does that mean I don't have to follow this step:

http://mmenu.frebsite.nl/tutorial/:

Now include jQuery and the jQuery.mmenu .js and .css files in the HEAD of your webpage.

<head>
<script src="path/to/jquery.js" type="text/javascript"></script>
<script src="path/to/jquery.mmenu.min.js" type="text/javascript"></script>
<link href="path/to/jquery.mmenu.css" type="text/css" rel="stylesheet" />
< /head>

If I'm wrong about that, can you set me straight? Thanks, much.


#4

HI @sarahc, @vincent is referring to the script:

<script src="path/to/jquery.js" type="text/javascript"></script>

Webflow sites already have this included so you can just add your jQuery without adding it again.


#5

Thank you, @thewonglv, that's very helpful.

I'm still not able to get the plug-in to work. Does anyone have an example of successfully integrating it? I have spent a great deal of time working through the instructions provided by mmenu, but there's clearly a gap in my knowledge and I'm not sure where it is.

Here is my test site where I'm comparing the mmenu and the navbar widget:


#6

I got this working!

I had to load the mmenu .js file in the "Footer Code" and put my mmenu script right after it.

I had been loading the mmenu files in the "Head Code" and getting a $(...).mmenu is not a function error, but this cleared it up.


#7