Menu icon Foundation

My Posts

  • 5
    Replies
  • Upgrading JS to 5.1.1

    By Chris Williams

    js5.1.1

    Hi, I'm attempting to upgrade just the JS functionality of Foundation from the previous version to 5.1.1 I've literally just downloaded the javascript components plus foundation.js and overwritten the previous js folder. However, now nothing works a... (continued)

    Last Reply by Koen Poelhekke over 4 years ago





My Comments

Chris Williams commented on Rafi Benkual's post over 5 years

Hi Luca,

Can you load in the un-minified version of foundation, that way we can get a better idea of where the error line number is coming from.

Chris Williams commented on Rafi Benkual's post over 5 years

Do you have a link to the site where this code is being used? That doesn't appear to be being caused by the error I was was referring to earlier, so seems unrelated.

Chris Williams commented on Rafi Benkual's post over 5 years

Hi Luca,

Yeah I would be happy to. What is the error message saying?

Chris Williams commented on Rafi Benkual's post over 5 years

Hi Luca,

See my solution here for a fix for people only updating part of Foundation

http://foundation.zurb.com/forum/posts/2167-javascript-is-not-working

Chris Williams commented on Maximilien Lavallée's post over 5 years

Found the solution for anyone else not updating everything but just Javascript.

The new foundation creates a meta tag called .foundation-data-attribute-namespace on initialization.

This is used for namespacing components, and takes its namespace from the $namespace variable in _global.scss (it actually sets a font-name much like the media query meta tags do)

Because I was only updating the javascript and not the scss, I had no $namespace variable in my _global.scss file, nor did I have the css rule for giving .foundation-data-attribute-namespace a font.

I therefore added this logic and a $namespace variable and hey presto its works!

Chris Williams commented on Cody McCulloch's post over 5 years

I'm having this same issue, how did you resolve this?

Chris Williams commented on Chris Williams's post over 5 years

Hi, is there any specific scss/css file that I should be looking at or that you know causes issue.
I use scss and only import certain components, I also have made a number of customisations to the scss files so don't really want to overwrite those.

Also when I said previous version I meant 5.1.0 not 4

Chrome reports the following error:

Syntax error, unrecognized expression: [data-'Times New Roman'-joyride]

this appears to be the same issue as here
http://foundation.zurb.com/forum/posts/2112-foundation-5100-syntax-error-in-js

Chris Williams commented on Nikkitune's post over 5 years

Hi,

See my post here on the same subject.

http://foundation.zurb.com/forum/posts/1498-overriding-a-plugins-default-settings-bug

The solution posted there works, but depends on how comfortable you are with updating source code.
Ideally this shouldn't need to be done, but it appears to be a bug that needs patching. They did patch 'reveals' code recently to sort this same problem out and essentially did the very thing recommended in my post.

Hope that helps

Chris Williams commented on Rafi Benkual's post over 5 years

$(document)
.foundation({joyride: {
exposed:[0, 1, 3, 4], // Elements you require to be exposed
modal: false // Whether modal is on or off
}
})
.foundation('joyride', 'start');

Hope that helps

Chris Williams commented on Joren Mathews's post over 5 years

Yes, sorry I forgot to put it as that, you are correct.

Posts Followed

No Content

Following

    No Content

Followers

My Posts



My Comments

You commented on Rafi Benkual's post over 5 years

Hi Luca,

Can you load in the un-minified version of foundation, that way we can get a better idea of where the error line number is coming from.

You commented on Rafi Benkual's post over 5 years

Do you have a link to the site where this code is being used? That doesn't appear to be being caused by the error I was was referring to earlier, so seems unrelated.

You commented on Rafi Benkual's post over 5 years

Hi Luca,

Yeah I would be happy to. What is the error message saying?

You commented on Rafi Benkual's post over 5 years

Hi Luca,

See my solution here for a fix for people only updating part of Foundation

http://foundation.zurb.com/forum/posts/2167-javascript-is-not-working

You commented on Maximilien Lavallée's post over 5 years

Found the solution for anyone else not updating everything but just Javascript.

The new foundation creates a meta tag called .foundation-data-attribute-namespace on initialization.

This is used for namespacing components, and takes its namespace from the $namespace variable in _global.scss (it actually sets a font-name much like the media query meta tags do)

Because I was only updating the javascript and not the scss, I had no $namespace variable in my _global.scss file, nor did I have the css rule for giving .foundation-data-attribute-namespace a font.

I therefore added this logic and a $namespace variable and hey presto its works!

You commented on Cody McCulloch's post over 5 years

I'm having this same issue, how did you resolve this?

You commented on Chris Williams's post over 5 years

Hi, is there any specific scss/css file that I should be looking at or that you know causes issue.
I use scss and only import certain components, I also have made a number of customisations to the scss files so don't really want to overwrite those.

Also when I said previous version I meant 5.1.0 not 4

Chrome reports the following error:

Syntax error, unrecognized expression: [data-'Times New Roman'-joyride]

this appears to be the same issue as here
http://foundation.zurb.com/forum/posts/2112-foundation-5100-syntax-error-in-js

You commented on Nikkitune's post over 5 years

Hi,

See my post here on the same subject.

http://foundation.zurb.com/forum/posts/1498-overriding-a-plugins-default-settings-bug

The solution posted there works, but depends on how comfortable you are with updating source code.
Ideally this shouldn't need to be done, but it appears to be a bug that needs patching. They did patch 'reveals' code recently to sort this same problem out and essentially did the very thing recommended in my post.

Hope that helps

You commented on Rafi Benkual's post over 5 years

$(document)
.foundation({joyride: {
exposed:[0, 1, 3, 4], // Elements you require to be exposed
modal: false // Whether modal is on or off
}
})
.foundation('joyride', 'start');

Hope that helps

You commented on Joren Mathews's post over 5 years

Yes, sorry I forgot to put it as that, you are correct.

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content