Menu icon Foundation
Cannot initialise foundation

Hi,

I have included foundation as per the docs, I already had foundation v3 before and now I am upgrading to v5, but I keep getting a javascript error as per the error log below.

Does anyone have any idea what's wrong?

jQuery is being loaded in the header and foundation is being loaded in the footer.

The strange thing is that the Google font is being set as namespace and included in the attribute name.

[Error] Error: Syntax error, unrecognized expression: [data-Roboto, sans-serif-slider]
    error (jquery.js, line 1437)
	tokenize (jquery.js, line 2051)
	compile (jquery.js, line 2419)
	select (jquery.js, line 2509)
	Sizzle (jquery.js, line 843)
	matches (jquery.js, line 1375)
	filter (jquery.js, line 2645)
	winnow (jquery.js, line 2628)
	is (jquery.js, line 2683)
	a (foundation.min.js, line 8)
	init (foundation.min.js, line 8)
	init_lib (foundation.min.js, line 8)
	init (foundation.min.js, line 8)
	(anonymous function) (foundation.min.js, line 8)
	each (jquery.js, line 375)
	each (jquery.js, line 139)
	foundation (foundation.min.js, line 8)

initerrorattributeattr_nameslider

Hi,

I have included foundation as per the docs, I already had foundation v3 before and now I am upgrading to v5, but I keep getting a javascript error as per the error log below.

Does anyone have any idea what's wrong?

jQuery is being loaded in the header and foundation is being loaded in the footer.

The strange thing is that the Google font is being set as namespace and included in the attribute name.

[Error] Error: Syntax error, unrecognized expression: [data-Roboto, sans-serif-slider]
    error (jquery.js, line 1437)
	tokenize (jquery.js, line 2051)
	compile (jquery.js, line 2419)
	select (jquery.js, line 2509)
	Sizzle (jquery.js, line 843)
	matches (jquery.js, line 1375)
	filter (jquery.js, line 2645)
	winnow (jquery.js, line 2628)
	is (jquery.js, line 2683)
	a (foundation.min.js, line 8)
	init (foundation.min.js, line 8)
	init_lib (foundation.min.js, line 8)
	init (foundation.min.js, line 8)
	(anonymous function) (foundation.min.js, line 8)
	each (jquery.js, line 375)
	each (jquery.js, line 139)
	foundation (foundation.min.js, line 8)
Simon Facciol over 5 years ago

I have just managed to find the issue.

In my CSS file I had the following:
CSS
* { font-family: 'Roboto', sans-serif !important; }

I now moved this to the body { } and I am not getting errors anymore.