Skip to content

Instantly share code, notes, and snippets.

@ruprict
Created December 9, 2012 16:12
Show Gist options
  • Save ruprict/4245818 to your computer and use it in GitHub Desktop.
Save ruprict/4245818 to your computer and use it in GitHub Desktop.
ko.bindingHandlers.hidden = {
update: function(element, valueAccessor){
var value = ko.utils.unwrapObservable(valueAccessor());
ko.bindingHandlers.visible.update(element, function() {
return !value;
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment