SOLVED - .Foundation not a function error

Hello all, I am having a lot of trouble trying to resolve this issue. I am working with Foundation 5 on an older site and having issues firing any foundation javascript. Every one I try to use, I get the error “.foundation is not a function”. Currently I am trying to open a reveal model via JS. Any help would be appreciated.

MY INCLUDES before the closing body tag and firing foundation:

<script src="js/jquery-2.0.3.min.js"></script>
<script src="js/foundation.min.js"></script>
<script src="js/foundation/foundation.clearing.js"></script>
 <script src="js/foundation/foundation.equalizer.js"></script>
<script src="js/foundation.orbit.js"></script> 
<script src="js/core.js"></script> 

abide: {
validate_on: 'manual'

MY JAVASCRIPT below the closing body in a document ready function

   $(document).ready(function() {
      lots of code here.....
                $('#CCAccepted').foundation('reveal', 'open');

Hi, please provide a working codepen as reproducible testcase so we can check that.

Did you already try the documentready check for jQuery?

Thank you for the quick response.

1.) please provide a working codepen.

I tried making a pen but it wont load the sources because they are on an insecure server. If it helps I can provide the actual site address.

2.) Did you already try the document ready check for jQuery?

I am unsure of what check you are referring to. I have the code inside a document ready function which I thought ran when the document is ready. There is other code in the function that executes. Am I missing something?

You can use files from unpkg.

This should be fine then.

I really appreciate the help. I made a codepen. I have included the foundation 5 css libarary, jquery, and the js you provided. I believe it is still missing something but not sure what. My codepen is linked below. On the site that I am working on the foundation building blocks work if I don’t use JS or jquery. Tthe reveal models work with button clicks and are hidden when not in use.

I found the issue. I was loading 2 different versions of jquery twice on the page. Thanks again for the help.

Ah, yea this completely removes all previous jQuery plugins and attached methods. jQuery has also a noConflict mode if you really need two different versions. But you should be able to use the same version for Foundation 5 too (should work with 1.x, 2.x).