Create a gist now

Instantly share code, notes, and snippets.

@mhayes /README.md
Last active Dec 20, 2015

Using jQuery noConflict mode

Enabling noConflict mode

Using a default Foundation 5 download you'll see some code like this in your index.html file:

<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/foundation/js/foundation.min.js"></script>
<script src="js/app.js"></script>

In the included app.js you'll see:

$(document).foundation();

You'll want to enable noConflict by replacing that code with this:

jQuery.noConflict();
jQuery(document).foundation();

That's it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment