Lightswtich - JQuery Flip Toggle开关 [英] Lightswtich - JQuery Flip Toggle switch

查看:64
本文介绍了Lightswtich - JQuery Flip Toggle开关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我使用Lightswitch(VB)编写了一些应用程序并且非常喜欢使用它。我不是一个真正的开发人员,更多的是创建解决方案以解决我们公司中某些特定问题的业务用户,所以请原谅最有可能是新手问题。


我一直在使用HTML预览整理一些简单的解决方案,并尝试使用jquery组件,Toggle Switch,特别是作为一种显示值的方法用户的布尔字段。 (不幸的是我没有jquery经验)我
已经成功地将组件添加到渲染事件中的表单,但是我无法弄清楚如何将切换开关挂钩到我的基础数据集。显示如何将切换开关连接到基础布尔数据字段的代码片段非常有用
helpl。


提前致谢


Andre


解决方案

安德鲁,


这是一个应该做你需要的函数:

 function createBooleanSwitch(element,contentItem){
var


flipSwitch =


('< select data-role =" slider">< / select>')。appendTo(

Hi

I have written a few apps using Lightswitch (VB) and really enjoy using it. I am not really a developer, more of a business user creating solutions to solve some specific problems in our company, so please excuse what is most likely a newbie question.

I have been putting together some simple solutions using the HTML preview, and am trying to use a jquery component, the Toggle Switch, specifically as a way to display the value of a boolean field to the user. (Unfortunately I have no jquery experience)I have successfully added the component to the form in the render event, but am unable to work out how to hook the toggle switch to my underlying dataset. A code snippet showing how to wire a toggle switch to an underlying boolean data field would be extremely helpfull.

Thanks in advance

Andre

解决方案

Hi Andrew,

Here's a function that should do what you need:

function createBooleanSwitch(element, contentItem) {
    var


flipSwitch =


('<select data-role="slider"></select>').appendTo(


这篇关于Lightswtich - JQuery Flip Toggle开关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆