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

Re-rendering works not correctly? #151

Open
LiguidCool opened this issue Aug 12, 2016 · 3 comments
Open

Re-rendering works not correctly? #151

LiguidCool opened this issue Aug 12, 2016 · 3 comments

Comments

@LiguidCool
Copy link

https://jsfiddle.net/es8behkn/4/
I want, load many JSON files, but I can't render them. What do I do wrong?

@woubuc
Copy link

woubuc commented Aug 12, 2016

When you call .render on an element, it goes back to its original state as defined in the HTML. Try wrapping them in separate elements, like so: https://jsfiddle.net/edu1gp3a/

Alternatively, you could first do all AJAX requests, and then combine the data in 1 object and render it all at once.

@LiguidCool
Copy link
Author

Yep, that works. But if i use $('body').render(data); (or <html>? I want rerender whole html file ...
May be wrappers can help, but wrappers in wrappers etc ... Not good.

@LiguidCool
Copy link
Author

https://jsfiddle.net/8uau1qo7/1/
I can use async.js, but i think that also bad practice.

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