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

Issue with sample chat app #2629

Closed
dmuth opened this issue Aug 1, 2016 · 3 comments
Closed

Issue with sample chat app #2629

dmuth opened this issue Aug 1, 2016 · 3 comments

Comments

@dmuth
Copy link

dmuth commented Aug 1, 2016

While working through the sample at http://socket.io/get-started/chat/ I ran into some problems with jQuery handlers not firing.

I eventually traced it to not having $(document).ready(...) around the Javascript code.

e.g.

$( document ).ready(function() {
    $('form').submit(...
});

My recommendation is that $(document).ready() be aded to the source, as this may have tripped up other people as well.

Thanks,

-- Doug

@KhainTCore
Copy link

Thank you. I was driving myself crazy trying to figure out why it wasn't working.

@ghost
Copy link

ghost commented Aug 9, 2016

Thanks, the same here.

Btw, you can also add the $('form').submit( thing just before the closing body tag.

@darrachequesne
Copy link
Member

That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible).

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

3 participants