Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Object JavaScript Control Flow Bindings
<!DOCTYPE html>
<title>Control Flow Bindings</title>
<input type="checkbox" data-bind="checked: displayMessage" />
Display message</label>
<div data-bind="if: displayMessage">There's something important here.</div>
<script src="Scripts/knockout-2.2.1.debug.js"></script>
displayMessage: ko.observable(false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment