0
votes

I'm using Zurb Foundation, specifically the file foundation.min.js to power one of their navigation bars (https://github.com/zurb/foundation)

It's already minified. When I smash it together with the rest of my minified javascript, I get an Uncaught TypeError in my console. I think it might be somehow conflicting with other scripts I have (Angular, among others)

So I was thinking it might be smart to somehow get an unminified version so it wouldn't conflict with the other code.

Any pointers here on what might be going on and how to fix it?

1
This is too localized, how are we supposed to tell what's going on if there's no code, no example, we don't know what libraries you're using... Just try the unminified library with your unminified code. Isolate the problem and debug your call stack. Then come back with the piece of code that fails and you might get some answers.elclanrs
Also, just in case, check that you prepend a semicolon to the script if it's not already there, that should avoid some minified concatenation problems with immediately invoked function expressions.elclanrs
Foundation has a Zepto/jQuery dependancy... Might be becoz of that... I had used an unminified version of foundation.js and the error pointed to line 26 which was thrown after neither of the above was found.Shyam K

1 Answers

0
votes

I am aware that this is an old question pertaining to an old version of foundation. Just in case this will be usefull to someone else: I was debugging an old site and the error in line 26 can be resolved if jQuery or Zepto is loaded before foundation.js oder foundation.min.js.

Simply put the link tags in your HTML in the appropriate order.