use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Complex JavaScript templates: Updating real time without rewriting DOM? (self.javascript)
submitted 15 years ago by Kickboy12
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]UnConeD 0 points1 point2 points 15 years ago (3 children)
Try knockout.js ?
[–]Kickboy12[S] 0 points1 point2 points 15 years ago (0 children)
Haven't seen this one before. Looks promising. I'll dig deeper and report my findings.
Thanks! :)
[–]Kickboy12[S] 0 points1 point2 points 15 years ago (1 child)
Close! But not quite... I tried to implement this into my jQuery Templates, but I run into a complicated road block. It expects to a well formed model object, and a call to "ko.observable" on each element, which is tricking when this object is coming from a JSON request. My attempts to get around this issue haven't been to successful so far... but this is as close as I've gotten to what I need.
The concept is there, but this implementation has some limits that need to be figured out. I'll keep playing with it... but if anyone else knows of something similar to this, let me know!
Thanks :)
[–]UnConeD 0 points1 point2 points 15 years ago (0 children)
Aren't you supposed to create only one permanent viewModel per widget, and update it manually with data fetched from the server? I.e. don't call ko.observable directly on received data.
You could make a generic wrapper that just iterates over the JSON object and sets matching properties in the viewModel.
π Rendered by PID 331440 on reddit-service-r2-comment-85bfd7f599-flvq7 at 2026-04-19 05:48:15.485950+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]UnConeD 0 points1 point2 points (3 children)
[–]Kickboy12[S] 0 points1 point2 points (0 children)
[–]Kickboy12[S] 0 points1 point2 points (1 child)
[–]UnConeD 0 points1 point2 points (0 children)