JQuery Mobile中带有复选框的树结构 [英] Tree structure with Check boxes in JQuery Mobile

查看:109
本文介绍了JQuery Mobile中带有复选框的树结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在JQuery MObile中是否可能具有带有复选框的树结构.我没有在演示中找到任何东西.

Is it possible to have a tree structure with check boxes in JQuery MObile. I did not find any thing in demos.

我想要类似此图像的图像:还有其他方法可以实现此效果吗?

I wanted something similar this image: Is there any alternative way we can achieve this?

推荐答案

这只是一个概念,但我有几个可行的示例:

Well it's just a concept but I have a couple working examples:

  • http://jsfiddle.net/JYn53/2/
  • http://jsfiddle.net/JYn53/4/

HTML

<div data-role="page"> 
    <div data-role="content">
        <div data-role="collapsible" data-collapsed="true"> 
            <h3>
                <input type="checkbox" name="checkbox-1a" id="checkbox-1a" class="custom" /> 
                <label for="checkbox-1a">Cheetos</label> 
            </h3> 
            <p>
                <div  data-role="fieldcontain"> 
                     <fieldset data-role="controlgroup"> 
                        <legend>Choose as many snacks as you'd like:</legend> 
                        <input type="checkbox" name="checkbox-1aa" id="checkbox-1aa" class="custom" /> 
                        <label for="checkbox-1aa">Cheetos</label> 

                        <input type="checkbox" name="checkbox-2aa" id="checkbox-2aa" class="custom" /> 
                        <label for="checkbox-2aa">Doritos</label> 

                        <input type="checkbox" name="checkbox-3aa" id="checkbox-3aa" class="custom" /> 
                        <label for="checkbox-3aa">Fritos</label> 

                        <input type="checkbox" name="checkbox-4aa" id="checkbox-4aa" class="custom" /> 
                        <label for="checkbox-4aa">Sun Chips</label> 
                    </fieldset> 
                </div> 
            </p> 
        </div>
    </div>
</div>

这篇关于JQuery Mobile中带有复选框的树结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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