Foundation 6 "t.getBoundingClientRect is not a function" error on browser resize

880 Views Asked by At

I am using foundation 6 framework for my project and its working fine; but whenever I re-size browser window I get an error in console (attached a screenshor)

Screenshot

foundation.min.js:1 Uncaught TypeError: t.getBoundingClientRect is not a function
at Object.o [as GetDimensions] (foundation.min.js:1)
at e.value (foundation.min.js:2)
at e.value (foundation.min.js:3)
at HTMLDivElement.dispatch (jquery.js:5206)
at HTMLDivElement.elemData.handle (jquery.js:5014)
at Object.trigger (jquery.js:8201)
at jQuery.fn.init.triggerHandler (jquery.js:8275)
at MutationObserver.i (foundation.min.js:1)
1

There are 1 best solutions below

0
On

!!!SOLVED

I Had the same error.

Was using before the error:

$(document).foundation();
jQuery(document).ready(function($){...}

Just move foundation call inside the .ready function:

jQuery(document).ready(function($){
   $(document).foundation();
});