I'm trying to use knockout and jquerymobile and can't get it to work. Here's my code:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<script src="/nw/scripts/jquery-1.8.2.js"></script>
<script src="/nw/scripts/knockout-2.1.0.debug.js"></script>
<script src="/nw/scripts/jquery.mobile-1.2.0.js"></script>
<link rel="stylesheet" href="/nw/scripts/jquery.mobile-1.2.0.css" />
<title>title</title>
</head>
<body>
<div>
<script type="text/javascript">
function AppViewModel() {
this.test = [{ "name": "noam", "age": "36" }, { "name": "yael", "age": "34"}];
}
$(document).ready(function () {
ko.applyBindings(AppViewModel());
});
</script>
<ul data-bind="foreach: test" id="myList">
<li>test <span data-bind="text: name"></span></li>
</ul>
</div>
</body>
</html>
When I run this I get the following error: Uncaught Error: NOT_FOUND_ERR: DOM Exception 8
When I comment out the jquerymobile scripts, it works.
Any help would be appriciated