Skip to content

Instantly share code, notes, and snippets.

@weepy
Forked from troygoode/collection-issue.html
Created March 27, 2012 15:06
Show Gist options
  • Save weepy/2216697 to your computer and use it in GitHub Desktop.
Save weepy/2216697 to your computer and use it in GitHub Desktop.
o_O: Collection Issue?
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<!-- this is the DOM template for our o_O app below -->
<div id="team">
<ul bind="foreach: people()">
<li bind="text: this"></li>
</ul>
</div>
<!-- o_O depends on jquery or whatever else is bound to '$' -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://raw.github.com/weepy/o_O/master/o_O.js"></script>
<script>
var people = o_O.property(['Hewy', 'Dewy', 'Lewy'])
o_O.bind(people, '#team');
window.setTimeout(function(){
people(['Moe', 'Larry', 'Curly'])
}, 1000)
</script>
</body>
</html>
@weepy
Copy link
Author

weepy commented Mar 27, 2012

I made it simpler - but there's definitely a bug ! ... just get added to the end ... looking now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment