foundation-sites: Problems with jQuery 3

What happend? Please update the deprecated method calls.

e.g. sample.load(fn()) to sample.on('load', fn())

How can we reproduce this bug?

  1. Use Foundation 5 in a project via NodeJs –> dependency in package.json: jQuery >= 2.x.x ----> jQuery 3.0.0 is installed (breaking changes)

What did you expect to happen? Foundation should not throw any error. Please update the code so that it don’t use deprecated methods.

What happened instead? Foundation throws error.

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 13
  • Comments: 33 (11 by maintainers)

Most upvoted comments

@Baedda It should be. I just update the release notes highlighting this for the PR in question that fixed it.

We decided not to change the default to jQuery 3 until the minor release, but projects using 3 should now work.

@kball I have a Foundation 5 project that’s very hard to move to Foundation 6 - and latest jQuery 2 (v2.2.4) has security issues, so would like Foundation 5 to be compatible with jQuery 3.

You basically just have to replace: $(window).load(function() { ... }); with $(window).on('load', function() { ... });

Could you release af version of Foundation 5 with the fix, please?

This is not fixed.

$(window).on("load", function (e) {}) currently does not work with jQuery 3.2.1

@h0r0man you are using 6.2.3 in your pen. Changing it to 6.2.4 fixes the errors.

After upgrading my test project to latest jquery

bower i --save jquery

and FS 6.3.0

bower i --save foundation-sites

verifying

bower list
    bower check-new     Checking for new versions of the project dependencies...
    test-site /srv/www/test
    ├── foundation-icon-fonts#afed003521
    ├─┬ foundation-sites#6.3.0
    │ ├── jquery#3.1.1 incompatible with ~2.2.0 (2.2.4 available, latest is 3.1.1)
    │ └── what-input#4.0.4
    └── jquery#3.1.1

updating the project still warns about “Code incompatibilities” re: jquery 3 “vs” FS6

bower update
    bower not-cached    https://github.com/zurb/foundation-icon-fonts.git#*
    bower resolve       https://github.com/zurb/foundation-icon-fonts.git#*
    bower cached        https://github.com/zurb/foundation-sites.git#6.3.0
    bower validate      6.3.0 against https://github.com/zurb/foundation-sites.git#^6.3.0
    bower cached        https://github.com/jquery/jquery-dist.git#3.1.1
    bower validate      3.1.1 against https://github.com/jquery/jquery-dist.git#^3.1.1
    bower download      https://github.com/zurb/foundation-icon-fonts/archive/master.tar.gz
    bower cached        https://github.com/jquery/jquery-dist.git#2.2.4
    bower validate      2.2.4 against https://github.com/jquery/jquery-dist.git#~2.2.0
    bower cached        https://github.com/ten1seven/what-input.git#4.0.4
    bower validate      4.0.4 against https://github.com/ten1seven/what-input.git#~4.0.3
    bower extract       foundation-icon-fonts#* archive.tar.gz
    bower resolved      https://github.com/zurb/foundation-icon-fonts.git#afed003521

    Please note that,
        foundation-sites#6.3.0 depends on jquery#~2.2.0 which resolved to jquery#2.2.4
        test-site depends on jquery#^3.1.1 which resolved to jquery#3.1.1
    Resort to using jquery#^3.1.1 which resolved to jquery#3.1.1
    Code incompatibilities may occur.

What’s the current ‘official’ stance on jQuery? If it’s ‘supported’, what about these errors/warnings? If it’s NOT supported, what’s the target version of FS to get full support?

This is fixed in 6.2.4, which will be released TOMORROW. 😃

I am running into the same problem, does anyone from foundation team know the best way to solve this problem?

Same thing happened to me. Update would be very nice 😃