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