Bind knockout.js to a boolean JQuery Mobile flip switch toggle
问题 i have a boolean value bound to a JQM flip switch toggle, but i'm not able to see it reacting to changes to the underlying observable. This is my true/false observable: ko.booleanObservable = function (initialValue) { var _actual = ko.observable(initialValue); var result = ko.computed({ read: function () { var readValue = _actual().toString(); return readValue; }, write: function (newValue) { var parsedValue = (newValue === "true"); _actual(parsedValue); } }); return result; }; Which is the