Javascript 取消选中/选中显示内容jquery?

Javascript 取消选中/选中显示内容jquery?,javascript,jquery,html,Javascript,Jquery,Html,我有密码 <div class="option-other"> <h5>Color:</h5> <input class="other-select" type="checkbox" data-price="50" data-value="Red"> Red <br/> <input class="other-selec

我有密码

<div class="option-other">
                <h5>Color:</h5>
                    <input class="other-select" type="checkbox" data-price="50" data-value="Red"> Red <br/>
                    <input class="other-select" type="checkbox" data-price="30" data-value="Green"> Green <br/>
                    <input class="other-select" type="checkbox" data-price="40" data-value="Blue"> Blue <br/>
                <h5>Layout</h5>
                    <input class="other-select" type="checkbox" data-price="50" data-value="1 Column "> 1 Column <br/>
                    <input class="other-select" type="checkbox" data-price="60" data-value="2 Column"> 2 Column <br/>
                    <input class="other-select" type="checkbox" data-price="70" data-value="3 Columnq"> 3 Column <br/>
            </div>

颜色:
红色
绿色
蓝色
布局 1列
2列
3列
我会在选中“显示内容”复选框和取消选中“隐藏内容”复选框时选择此选项。如何为Jquery编码? 示例:选中复选框“红色”显示内容“红色”,取消选中框“红色”隐藏内容“红色”。
像网站一样

不需要Javascript或jQuery。CSS也可以这样做,方法是将文本包装在
中,并结合使用:

。选项其他输入[type=checkbox]+span{
显示:无;
}
.选项其他输入[类型=复选框]:选中+span{
显示:内联;
}

颜色:
红色
绿色
蓝色
布局 1列
2列
3列

试试这个漂亮的答案。你们是虾忘记CSS允许这些技巧:但我想构建应用程序喜欢,列左时,用户点击复选框,列右显示内容复选框,并取消选中隐藏当你们可能想重写你们的问题@Jackey。。。。但我会看看我能做些什么……如果答案适合你,请点击左边的v标记,将其标记为解决方案。