I want to create a page containing more with nested lists.
Using jQueryUI selectable(), I want to select some container and then some list item.
Selecting an item seems not working correctly in my case.
- Containing div gets ui-selecting and ui-selected at the same time.
- Click on list item sometimes works, but not all the time
- Disabling selection on mainview it works correctly again.
Is this behavior problem of jQuryUI or is it my problem?
Thanks!
<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>