Title: Javascript Errors, $ is not a function
Last modified: August 20, 2016

---

# Javascript Errors, $ is not a function

 *  [JeremyEnglert](https://wordpress.org/support/users/jeremyenglert/)
 * (@jeremyenglert)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/javascript-errors-is-not-a-function/)
 * I’m merging [Foundation 4](http://foundation.zurb.com/) with [Bones](http://themble.com/bones/)
   to create a WP Starter theme. I had everything working fine with the JS from 
   Foundation 3, but now that I’m trying to implement the Foundation 4 JS I’m running
   into some issues.
 * I followed the steps found in the [Foundation 4 JS Documentation](http://foundation.zurb.com/docs/javascript.html),
   but still had no luck. Here is the code I placed directly before the closing 
   body tag (I know the correct way is to enqueue the script, but for testing I 
   was just pasting it directly above the closing body tag):
 *     ```
       <script>
         document.write('<script src=http://theadgarage.com/jointswp/wp-content/themes/bones-master/library/js/vendor/'
           + ('__proto__' in {} ? 'zepto' : 'jquery')
           + '.js><\/script>');
           </script> 
   
           <script src="http://theadgarage.com/jointswp//wp-content/themes/bones-master/library/js/foundation.min.js"></script>
   
           <script>
         $(document).foundation();
         </script>
       ```
   
 * I’m attempting to open a modal on [this page](http://theadgarage.com/jointswp/features-2/),
   but as you can see, the modal never fires when you click the link. I notice some
   errors in the Javascript console, but I’m still new to JS so they are a bit over
   my head.
 * As I mentioned before, things were working fine with the Foundation 3 JS, which
   didn’t require the call to initialize the function – it just seemed to work. 
   Not sure if that makes a huge difference, but it’s something I noticed that was
   different about the documentation for Foundation 4 JS compared to Foundation 
   3 JS.
 * Can anyone get me pointed in the right direction?

Viewing 1 replies (of 1 total)

 *  [Justin Peacock](https://wordpress.org/support/users/mrdink/)
 * (@mrdink)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/javascript-errors-is-not-a-function/#post-3569028)
 * Take a look at how it’s included in this theme [drewsymo/Foundation](https://github.com/drewsymo/Foundation/blob/master/functions.php#L94)
 * You’ll need to deregister jQuery ([line 66](https://github.com/drewsymo/Foundation/blob/master/functions.php#L66)).

Viewing 1 replies (of 1 total)

The topic ‘Javascript Errors, $ is not a function’ is closed to new replies.

## Tags

 * [foundation](https://wordpress.org/support/topic-tag/foundation/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Justin Peacock](https://wordpress.org/support/users/mrdink/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/javascript-errors-is-not-a-function/#post-3569028)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
