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

use on() to listen for the load event #10729

Merged
merged 2 commits into from Dec 24, 2017
Merged

use on() to listen for the load event #10729

merged 2 commits into from Dec 24, 2017

Conversation

DanielRuf
Copy link
Contributor

@DanielRuf DanielRuf commented Oct 16, 2017

.load() is deprecated since jQuery 1.8 and the event can only be fetched with .on('load')

Note: Prior to jQuery 3.0, the event handling suite also had a method named .load(). Older versions of jQuery determined which method to fire based on the set of arguments passed to it.

https://api.jquery.com/load/
https://api.jquery.com/load-event/

Copy link
Contributor

@DaSchTour DaSchTour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@ncoden ncoden merged commit 7839710 into foundation:develop Dec 24, 2017
@DanielRuf DanielRuf deleted the patch-on-load branch December 24, 2017 18:06
ncoden pushed a commit to ncoden/foundation-sites that referenced this pull request Jun 16, 2018
….5.0

4ad4a07 use on() to listen for the load event
de54ab2 use on() to listen for the load event

Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
@rainzetroc
Copy link

Hi Daniel i encounter this issue since i have to use jquery 3.3.1 . im confuse which one i have to change with the .load part. i dont have much experience with jquery even with .net

@DanielRuf
Copy link
Contributor Author

In the source files there are two components which use the old syntax. You can see the direct changes at https://github.com/zurb/foundation-sites/pull/10729/files

@rainzetroc
Copy link

i check every function and manually look for the .load. quite hard to find, then finally the widget is working fine now, made it work with version 3.3.1 :D
im not sure about your question of what version of foundation sites, but im using npm. i cant show you the exact error since it contains some details. but i can show you list of error shown in console.

Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught TypeError: Cannot read property 'pointerType' of undefined
Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught TypeError: Cannot read property 'en' of undefined
(Then the console of my widget show)
Uncaught TypeError: resCont.truncate is not a function
Uncaught TypeError: Cannot read property 'left' of undefined

@DanielRuf
Copy link
Contributor Author

Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught TypeError: Cannot read property 'pointerType' of undefined
Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught TypeError: Cannot read property 'en' of undefined
(Then the console of my widget show)
Uncaught TypeError: resCont.truncate is not a function
Uncaught TypeError: Cannot read property 'left' of undefined

These are all unrelated to the issue.
404s mean that a file can not be found on your server (the URL is probably wrong).
Also something accesses .pointerType but the text before it is undefined (you can click on the line number in the console on the right side).
Same for something .en, .left and .truncate() is not a function on resCont.

Generally I also provide free mentoring (if this is a freetime project that you are working on and nothing from your workplace) where I help people to understand how they can solve issues in their projects and son on.

Let me know if you need any help in regard of this (only freetime projects).

Otherwise, the exact error messages are always helpful.

The error which points to the load problem would be TypeError: url.indexOf is not a function.

See #10096

@rainzetroc
Copy link

Thanks a lot, actually this is work related. this is part of my story. i would love to learn more since im a newbie, and its my firstime to use this one. react /redux is our main tech and i can rate myself for 1/10 haha i would love to read more helpful stuffs you will share to improve my programming skills.

@DanielRuf
Copy link
Contributor Author

If you are interested, I can invite you. You just have to join https://gitter.im with your GitHub login.

@rainzetroc
Copy link

sure please im interested.im not so familiar how to use that do you have social media account?

@DanielRuf
Copy link
Contributor Author

@rainzetroc I've sent you the links on Gitter to our channels for Foundation.

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

Successfully merging this pull request may close these issues.

4 participants