Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created September 30, 2012 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raynos/3808721 to your computer and use it in GitHub Desktop.
Save Raynos/3808721 to your computer and use it in GitHub Desktop.
kids.connect("/my/unique/room/uri")
var clicks = kids().click()
, counter = 0
clicks
.map(function () {
return counter++
})
.save("counters")
var counters = kids().get("counters")
counters
.map(function (counter) {
return "<div>" + counter + "</div>"
})
.insert(".parent")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment