xiaolizi007
11/22/2016 - 6:49 AM

From http://wiki.jikexueyuan.com/project/kendo-ui-development-tutorial/kendo-mvvm-data-binding-causevisible.html invisible


<div id="view">
    <div data-bind="invisible: isInvisible">some content

    </div>
     <button data-bind="click: show">Show</button>
</div>
<script>
    var viewModel = kendo.observable({
        isInvisible: true,
        show: function () {
            this.set("isInvisible", false);
        }
    });

    kendo.bind($("#view"), viewModel);
</script>