Why doesn't this simple Knockout.js example work?

smokingyade

New Member
I am playing around with Knockout.js and created this simple example: http://jsfiddle.net/JcTxT/30/\[code\]<div id="term_grp" data-role="fieldcontain"><a>Semester:</a><fieldset id="term_fields" data-role="controlgroup" data-type="horizontal"> <input type="radio" name="term" id="ss" value="http://stackoverflow.com/questions/15637683/ss" data-bind="checked: term" /> <label for="ss">Sommersemester</label> <input type="radio" name="term" id="ws" value="http://stackoverflow.com/questions/15637683/ws" data-bind="checked: term" /> <label for="ws">Wintersemester</label></fieldset>Term is <span data-bind="text: pommes"></span>\[/code\]\[code\]var aResult = { term: ko.observable("ss"), pommes: "TEST"};$(document).on('pagebeforeshow', '#mainPage', function () { ko.applyBindings(aResult);});\[/code\]I expected one of the radio button to be checked (the one with the value "ss" but this is not the case. Does anyone know, why?Cheers
 
Back
Top