Menu icon Foundation
foundation.min.js?ver=6.2.3:1 TypeError: Cannot read property 'plugin' of undefined

Keep getting this error. Any insight what this means?

Im including the foundation.min.js script

in the bottom of the page and then including a foundation-init.js script which looks like this.

 

jQuery(document).ready(function( $ ) {

  $(document).foundation();

  $('a.offcanvas-left-trigger').click(function() {
    $('#offCanvasLeft').foundation('open');
  });

  $('a.offcanvas-right-trigger').click(function() {
    $('#offCanvasRight').foundation('open');
  });

});

jsTypeError. plugin

Keep getting this error. Any insight what this means?

Im including the foundation.min.js script

in the bottom of the page and then including a foundation-init.js script which looks like this.

 

jQuery(document).ready(function( $ ) {

  $(document).foundation();

  $('a.offcanvas-left-trigger').click(function() {
    $('#offCanvasLeft').foundation('open');
  });

  $('a.offcanvas-right-trigger').click(function() {
    $('#offCanvasRight').foundation('open');
  });

});
Rafi Benkual about 2 years ago

Not sure what the purpose of jQuery(document).ready(function( $ ) {

This is the typical way to initialize foundation

 

$(document).foundation();

Shawn Mosher about 2 years ago

It's WordPress noconflict wrap

 

http://wptricks.net/jquery-noconflict-wrappers-on-wordpress/

Kalen Shuck 7 days ago

Did you ever figure out what the problem was?  I am running into the same thing, and can't seem to track it down.  I've upgraded my foundation version as well as my jquery version.