Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery UI Sortable connected list css issues
    text
    copied!<p>I am using jquery ui sortable with connected lists. I have 2 problems with one most important requirement.</p> <ol> <li>Items goes behind the other list while dragging <code>li.ui-splitselect-item</code> </li> <li>Dragging item to right(when mouse is too right) creates Horizontal scroll</li> </ol> <p><strong>IMPORTANT:</strong> Lists <code>ul.ui-splitselect-list</code> should have <code>overflow-y:auto;</code> So Header of lists stay fixed and only list items are scrolled <img src="https://i.stack.imgur.com/bYxWh.png" alt="enter image description here"></p> <p><strong>NOTE:</strong> I previous asked this question on <a href="https://stackoverflow.com/questions/19674409/jquery-ui-sotable-connected-list-items-container-zinxed-issue">STACKOVERFLOW</a> but didnt notice my important requirement was missing from solution so i opened question again with clarity.</p> <p><strong>JSFIDDLE:</strong> <a href="http://jsfiddle.net/bababalcksheep/z67Td/" rel="nofollow noreferrer">http://jsfiddle.net/bababalcksheep/z67Td/</a></p> <p><strong>HTML Mockup:</strong></p> <pre><code>&lt;div class="ui-splitselect ui-helper-clearfix ui-widget ui-widget-content" style="height:200px;" &gt; &lt;div class="ui-widget-content ui-splitselect-selected"&gt; &lt;div class="ui-widget-header ui-helper-clearfix"&gt; List1 &lt;/div&gt; &lt;ul id="sortable1" class="ui-splitselect-list" style="height: 332px;"&gt; &lt;li class="ui-splitselect-item ui-state-default"&gt; &lt;a class='ui-splitselect-handle-drag'&gt;&lt;span class='ui-icon ui-icon-carat-2-n-s'&gt;&lt;/span&gt;&lt;/a&gt; &lt;span class="ui-splitselect-handle-select"&gt;TEST-List1&lt;/span&gt; &lt;a class="ui-splitselect-handle-move" href="#"&gt;&lt;span class="ui-icon ui-icon-plus"&gt;&lt;/span&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="ui-widget-content ui-splitselect-available" &gt; &lt;div class="ui-widget-header ui-helper-clearfix"&gt; List2 &lt;/div&gt; &lt;ul id="sortable2" class="ui-splitselect-list" style="height: 332px;"&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>.ui-splitselect{font-size:.8em;width:100%!important;text-align:center;margin:0 auto;padding:0} .ui-splitselect ul{-moz-user-select:none} .ui-splitselect .ui-widget-header{border:none;font-size:11px} .ui-splitselect-selected{height:100%!important;float:left;border:none;width:50%;margin:0;padding:0} .ui-splitselect-available{height:100%!important;width:49.4%;float:left;border-top:none;border-bottom:none;border-right:none;margin:0;padding:0} .ui-splitselect-list{height:92%!important;position:relative;list-style:none;overflow:auto;margin:0;padding:0} .ui-splitselect-item{cursor:default;line-height:20px;height:20px;font-size:11px;list-style:none;display:list-item;white-space:nowrap;overflow:hidden;margin:1px;padding:0} .ui-splitselect-item.ui-sortable-helper{z-index:99999} .ui-splitselect-handle-select{float:left} .ui-splitselect-handle-drag{float:left;height:20px;border-top:0;border-bottom:0;cursor:pointer;margin:0 10px 0 5px;padding:2px 5px} .ui-splitselect-handle-move{text-decoration:none;cursor:pointer;float:right;height:20px;border-top:0;border-bottom:0;margin:0 5px 0 10px;padding:2px 5px} </code></pre> <p><strong>JS:</strong></p> <pre><code> $("#sortable1, #sortable2").sortable({ connectWith: ".ui-splitselect-list", containment: ".ui-splitselect", scroll: false, placeholder: "ui-state-highlight ui-splitselect-item" }).disableSelection(); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload