1

I need to make sortable divs in fluid bootstrap's layout.. here is my code at jsfiddle: http://jsfiddle.net/6UkdR/

        <div class="row-fluid">
<div id="sortable">
            <span class="span3">
                <div class="thumbnail">
                </div>
            </span>
            <span class="span3">
                <div class="thumbnail">
                </div>
            </span>
            <span class="span3">
                <div class="thumbnail">
                </div>
            </span>
 </div>
        </div>
    <div class="row-fluid">
<div id="sortable">
            <span class="span3">
                <div class="thumbnail">
                </div>
            </span>
            <span class="span3">
                <div class="thumbnail">
                </div>
            </span>
            <span class="span3">
                <div class="thumbnail">
                </div>
            </span>
        </div>
 </div>

1) if you try to move first or latest div in , оther divs are shifted.

2) how to connect both ? with that code, i can drag-n-sort divs only in one row but i need to sort divs from all 's.

ovnia
  • 2,412
  • 4
  • 33
  • 54

1 Answers1

2

Seems like an issue with a placeholder. I have added margin fix to it:

.ui-sortable-placeholder {
     margin-left: 0 !important;
}

Seems to be okay now.

Demo

And for sorting between lists you can use connectWith.

mishik
  • 9,973
  • 9
  • 45
  • 67
  • What do you mean? I can drag all 4 divs in a row and do not get "jumps". – mishik Jun 12 '13 at 16:46
  • hmm..tested in opera, and it works fine, but in chrome, last div just jump down onClick. – ovnia Jun 12 '13 at 16:49
  • 1
    I think I see it... I'm using Chrome and I manage to get it "jumpy" when HTML window is too narrow to fit "алгоритмов" in a block. If I extend it a bit - works fine. Squeeze - get jumps. I assume you can put min-width for "body" anyway to avoid "text out of borders" – mishik Jun 12 '13 at 16:52
  • 1
    Also, I spotted an issue with "connecting" sortables. Your sortables have 0px height, so one will not be able to drag elements from one to another. I suggest you set some "min-height". I've updated my answer. – mishik Jun 12 '13 at 16:56
  • yep, but it still bugged as hell – ovnia Jun 12 '13 at 17:00