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

Appending new data #43

Closed
Vinze opened this issue Jun 21, 2013 · 3 comments
Closed

Appending new data #43

Vinze opened this issue Jun 21, 2013 · 3 comments

Comments

@Vinze
Copy link

Vinze commented Jun 21, 2013

Not sure if this has been asked before, but I couldn't find anything related to my question.

When a page loads I'm pulling a json file with ten rows from the database, these rows are then welded to a table. When the user clicks on a 'load more' button, another ten rows will be loaded through ajax.

These rows need to be welded to the same table, but without overwriting existing rows. Is there a way to append new data?

@tmpvar
Copy link
Owner

tmpvar commented Jun 21, 2013

Try welding into a document fragment, then append the resulting elements where you need them. I do this for npmsearch.com

@Vinze
Copy link
Author

Vinze commented Jun 22, 2013

I'll have a look how you did this on npmsearch.com, thanks for the (fast) answer!

@Vinze Vinze closed this as completed Jun 22, 2013
@tmpvar
Copy link
Owner

tmpvar commented Jun 23, 2013

no problem, it's in http://npmsearch.com/js/connection.js, and looks like https://gist.github.com/tmpvar/5843420

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