Kendo UI开发教程(18): Kendo MVVM 数据绑定(七) Invisible/Visible
来源:互联网 发布:ubuntu c语言 编辑:程序博客网 时间:2024/05/20 03:40
Invisible/Visible绑定可以根据ViewModel的某个属性来显示/隐藏DOM元素。
例如:
1
<
div
id
=
"view"
>
2
<
div
data-bind
=
"invisible: isInvisible"
>some content
3
4
</
div
>
5
<
button
data-bind
=
"click: show"
>Show</
button
>
6
</
div
>
7
<
script
>
8
var viewModel = kendo.observable({
9
isInvisible: true,
10
show: function () {
11
this.set("isInvisible", false);
12
}
13
});
14
15
kendo.bind($("#view"), viewModel);
16
</
script
>
0 0
- Kendo UI开发教程(18): Kendo MVVM 数据绑定(七) Invisible/Visible
- Kendo UI开发教程(18): Kendo MVVM 数据绑定(七) Invisible/Visible
- Kendo UI开发教程(12): Kendo MVVM 数据绑定(一) attr
- Kendo UI开发教程(13): Kendo MVVM 数据绑定(二) Checked
- Kendo UI开发教程(14): Kendo MVVM 数据绑定(三) Click
- Kendo UI开发教程(15): Kendo MVVM 数据绑定(四) Disabled/Enabled
- Kendo UI开发教程(16): Kendo MVVM 数据绑定(五) Events
- Kendo UI开发教程(17): Kendo MVVM 数据绑定(六) Html
- Kendo UI开发教程(19): Kendo MVVM 数据绑定(八) Style
- Kendo UI开发教程(20): Kendo MVVM 数据绑定(九) Text
- Kendo UI开发教程(21): Kendo MVVM 数据绑定(十) Source
- Kendo UI开发教程(22): Kendo MVVM 数据绑定(十一) Value
- Kendo UI开发教程(12): Kendo MVVM 数据绑定(一) attr
- Kendo UI开发教程(13): Kendo MVVM 数据绑定(二) Checked
- Kendo UI开发教程(14): Kendo MVVM 数据绑定(三) Click
- Kendo UI开发教程(15): Kendo MVVM 数据绑定(四) Disabled/Enabled
- Kendo UI开发教程(16): Kendo MVVM 数据绑定(五) Events
- Kendo UI开发教程(17): Kendo MVVM 数据绑定(六) Html
- Kendo UI开发教程(16): Kendo MVVM 数据绑定(五) Events
- Excel数据导人到DataGridView和Excel数据导人到ListView
- Kendo UI开发教程(17): Kendo MVVM 数据绑定(六) Html
- log4.xml
- Unicode下CString与char_转换
- Kendo UI开发教程(18): Kendo MVVM 数据绑定(七) Invisible/Visible
- Microsoft Visual Studio 2013 Update 1 离线安装程序
- SVN版本冲突解决详解@http://blog.csdn.net/windone0109/article/details/4857044
- Kendo UI开发教程(19): Kendo MVVM 数据绑定(八) Style
- 【C++】浙大PAT (Basic Level)1009. 说反话 (20)
- DNN客户端API
- Kendo UI开发教程(20): Kendo MVVM 数据绑定(九) Text
- android开发笔记之mtk平台 手机恢复出厂设置数据不删除的方法
- ASoc音频框架驱动小结