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

y.appendChild is not a function #42

Open
KhaledOmara opened this issue Mar 28, 2016 · 4 comments
Open

y.appendChild is not a function #42

KhaledOmara opened this issue Mar 28, 2016 · 4 comments

Comments

@KhaledOmara
Copy link

I caught this error:
Error: TypeError: y.appendChild is not a function
Source File: path-to-file/js/social-share-kit.min.js
Line: 8

any Idea why am I seeing this?

@darklow
Copy link
Owner

darklow commented Mar 28, 2016

Please share your .init() code and HTML markup.

@KhaledOmara
Copy link
Author

HTML:
`






`

JS:
jQuery(document).ready(function($ept) { if($ept('.ssk-group').length){ SocialShareKit.init(); } });

@darklow
Copy link
Owner

darklow commented Mar 29, 2016

I doubt it will help, but could you try moving init outside jQuery?
You don't have to worry about running this on jQuery ready or checking if elements exists.
SSK js code does it already:
https://github.com/darklow/social-share-kit/blob/master/dist/js/social-share-kit.js#L28

@KhaledOmara
Copy link
Author

Ok I'll move it outside checking if the elements exist. But I think this is not the issue.

Lenovo P70-AOn Mar 29, 2016 9:44 PM, Kaspars Sprogis [email protected] wrote:

I doubt it will help, but could you try moving init outside jQuery?
You don't have to worry about running this on jQuery ready of checking if elements exists.
SSK js code does it already:
https://github.com/darklow/social-share-kit/blob/master/dist/js/social-share-kit.js#L28


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

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

No branches or pull requests

2 participants