mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
47 lines
2.0 KiB
HTML
Executable File
47 lines
2.0 KiB
HTML
Executable File
|
|
<div data-model="viewModel" data-role="view" id="switch-mvvm" data-title="Switch MVVM">
|
|
<ul data-role="listview" data-style="inset" data-type="group">
|
|
<li>
|
|
Configuration
|
|
<ul>
|
|
<li>Check <input type="checkbox" data-role="switch" data-bind="checked: isChecked"></li>
|
|
<li>Enable <input type="checkbox" data-role="switch" data-bind="checked: isEnabled"></li>
|
|
<li>Visible <input type="checkbox" data-role="switch" data-bind="checked: isVisible"></li>
|
|
<li>
|
|
<p>
|
|
Kendo UI Mobile Switch supports the
|
|
<a href="https://docs.telerik.com/kendo-ui/getting-started/framework/mvvm/bindings/checked">checked</a>,
|
|
<a href="https://docs.telerik.com/kendo-ui/getting-started/framework/mvvm/bindings/enabled">enabled</a>,
|
|
<a href="https://docs.telerik.com/kendo-ui/getting-started/framework/mvvm/bindings/events">events</a> and
|
|
<a href="https://docs.telerik.com/kendo-ui/getting-started/framework/mvvm/bindings/visible">visible</a> bindings.
|
|
</p>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
Switch
|
|
<ul>
|
|
<li>
|
|
Check <input data-role="switch"
|
|
data-bind="enabled: isEnabled,
|
|
visible: isVisible,
|
|
checked: isChecked,
|
|
events: { change: onChange }">
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="console"></div>
|
|
</div>
|
|
|
|
<script>
|
|
var viewModel = kendo.observable({
|
|
isChecked: true,
|
|
isEnabled: true,
|
|
isVisible: true,
|
|
onChange: function(e) {
|
|
kendoConsole.log("event :: change (" + (e.checked ? "checked" : "unchecked") + ")", false, "#switch-mvvm");
|
|
}
|
|
});
|
|
</script>
|