Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

zurb/foundation-migrate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

foundation-migrate: Migrate to Foundation 5.0+

This plugin will patch Foundation 4 JavaScript initialization code with Foundation 5 syntax and will log a warning that explains the error in your code. Use this plugin to migrate your Foundation 4 JavaScript to Foundation 5 JavaScript.

How to Use

The first thing to do is to install the Foundation 5 JavaScript, be sure to remove the Foundation 4 libraries:

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

After you have foundation and jQuery included before the closing body tag, drop in the Migrate plugin:

<script src="js/vendor/jquery.js"></script>
<script src="js/foundation/foundation.min.js"></script>
<script src="js/foundation.migrate.js"></script>

Then initialize Foundation:

<script src="js/vendor/jquery.js"></script>
<script src="js/foundation/foundation.min.js"></script>
<script src="js/foundation.migrate.js"></script>
<script>
  $(document).foundation();
</script>

Once you are no longer getting any warnings in your console with the FOUNDATION MIGRATION: prefix you can remove the foundation.migrate.js library from your page.