Tab layout, first commit with new third party packages
[openemr.git] / public / assets / knockout-3-4-0 / src / binding / defaultBindings / visible.js
blob8a802f521431ab6df54fcdb6add9e5b3098e5a78
1 ko.bindingHandlers['visible'] = {
2     'update': function (element, valueAccessor) {
3         var value = ko.utils.unwrapObservable(valueAccessor());
4         var isCurrentlyVisible = !(element.style.display == "none");
5         if (value && !isCurrentlyVisible)
6             element.style.display = "";
7         else if ((!value) && isCurrentlyVisible)
8             element.style.display = "none";
9     }