-
-
Save weepy/2216697 to your computer and use it in GitHub Desktop.
o_O: Collection Issue?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made it simpler - but there's definitely a bug ! ... just get added to the end ... looking now