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 DOM fragments instead of always creating elements #397

Open
jasongrout opened this issue Mar 12, 2013 · 0 comments
Open

use DOM fragments instead of always creating elements #397

jasongrout opened this issue Mar 12, 2013 · 0 comments
Milestone

Comments

@jasongrout
Copy link
Member

Taking a tip from William, it may be marginally faster and (more importantly) separates content/presentation better to use DOM fragments and cloning rather than creating elements (for example, for interact controls, or anywhere else we use the "ce" function). See http://ejohn.org/blog/dom-documentfragments/
For example (as a tip from William), load a lot of hidden divs/spans that contain DOM fragments for each interact control, etc. Clone these as needed and insert them into the DOM where needed.

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

1 participant