0

我想创建一个包含更多嵌套列表的页面。

使用jQueryUI selectable(),我想选择一些容器,然后选择一些列表项。

在我的情况下,选择一个项目似乎无法正常工作。

  1. 包含 div 的同时获得ui-selectingui-selected
  2. 单击列表项有时有效,但并非一直有效
  3. 在主视图上禁用选择它再次正常工作。

这是 jQuryUI 的行为问题还是我的问题?

谢谢!

    <script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.8.18.custom.js" type="text/javascript"></script>
    <style>

    #selectable .ui-selecting { background: #FECA40; }
    #selectable .ui-selected { background: #F39814; color: white; }
    #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
    #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
    </style>
    <script>
        $(function ()
        {
            $("#mainview").selectable({ filter: '.card' });
            $("#selectable").selectable();
        });

    </script>
</head>
<body>
    <div id='mainview'>
        <div id='container1' style="width: 200px; height: 250px; background-color: yellow;top=100; left=100;">
            <ol id="selectable">
                <li>Item 1</li>
                <li>Item 2</li>
            </ol>
        </div>         
    </div>
4

0 回答 0