Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Suggestion #2: jquery.mobile.listview.js#L229 #1502

Closed
StevenBlack opened this issue Apr 21, 2011 · 1 comment
Closed

Suggestion #2: jquery.mobile.listview.js#L229 #1502

StevenBlack opened this issue Apr 21, 2011 · 1 comment

Comments

@StevenBlack
Copy link
Contributor

See the .appendTo() statement here:
https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.listview.js#L229

Suggestion: keep all the lists outside the DOM, stashing them with a tempArray.push(), and then iterating tempArray calling .listview() (L235) for each, and THEN pass the whole tempArray to appendTo() once, outside the $.each() loop.

Speedier :-) One DOM insertion instead of many, and all manipulations are outside the DOM.

@toddparker
Copy link
Contributor

Added to the feature request wiki:
https://github.com/jquery/jquery-mobile/wiki/Feature-Requests

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

No branches or pull requests

2 participants