Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Zurb Foundation 3 causing an error #40

Open
GoogleCodeExporter opened this issue Apr 12, 2015 · 3 comments
Open

Using Zurb Foundation 3 causing an error #40

GoogleCodeExporter opened this issue Apr 12, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. We've used jquery-csv with no issues until we recently upgraded from Zurb 
Foundation 2 to Zurb Foundation 3. Now we get a jquery error.

Here's a Foundation2 page which does work:
http://www.nwcouncil.org/reports/financial-reports/2014-99/legal/

And a Foundation3 page which causes an error:
http://www.nwcouncil.org/reports/financial-reports/2014-99/admin

Chart is supposed to appear under "Staffing" heading, but developer console 
shows "Uncaught TypeError: Cannot read property 'toArrays' of undefined " at 
the line:

$.get(path+"rngHistoryByFunction.csv", function (csvString) {
            arrayData = $.csv.toArrays(csvString, { onParseValue: $.csv.hooks.castToScalar });

The Zurb Foundation seems the culprit because changing our two Zurb .js calls 
(foundation.js, app.js) from Foundation3 back to 2 fixes the problem.

Original issue reported on code.google.com by [email protected] on 15 Apr 2014 at 6:45

@GoogleCodeExporter
Copy link
Author

Oh last note, this is all running inside of Umbraco CMS (6.1.6).

Original comment by [email protected] on 15 Apr 2014 at 6:51

@GoogleCodeExporter
Copy link
Author

I'm not familiar with the Zurb Foundation framework or Umbraco CMS.

I assume it has to do with the loading order of scripts. For some reason, 
$.csv.toArrays is being called before the jquery.csv.js script is loaded and 
attached to the $ namespace.

The order of script definitions matter unless you're using a dependency library 
like RequireJS or AMD to load external JS scripts.

Does $.get work without issue? 
Are forcing the attached code to wait until $(document).ready() before loading 
it? That might help.

Original comment by [email protected] on 29 May 2014 at 3:19

@GoogleCodeExporter
Copy link
Author

I'm getting this too by trying to use $.csv.toArrays from a paste event, 
calling it at the point I subscribe to the paste event works fine. I'm very new 
to javascript though so I may be doing something wrong.

Original comment by [email protected] on 10 Feb 2015 at 1:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant