title: Jquery UI sortable portlets: switching the places of two portlets
body: <p>I am pretty new to the JQuery UI and not very familiar with how to use options, methods, and events.  I am using the Jquery UI Sortable portlets (example found <a href="http://jqueryui.com/sortable/#portlets" rel="nofollow" title="Jquery UI sortable portlets">here</a>) and what I'm doing is pretty similar to the example, I have 3 columns but I only have 1 portlet per column. </p>
  
  <p>(<a href="http://jsfiddle.net/FXrzN/" rel="nofollow">here is a fiddle</a>) and this is it's basic html:</p>
  
  <pre><code>&lt;div class="column"&gt;
      &lt;div class="portlet"&gt;
          &lt;div class="portlet-header"&gt;Feeds&lt;/div&gt;
          &lt;div class="portlet-content"&gt;Lorem ipsum dolor sit amet, consectetuer     adipiscing elit&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="column"&gt;
      &lt;div class="portlet"&gt;
          &lt;div class="portlet-header"&gt;Shopping&lt;/div&gt;
          &lt;div class="portlet-content"&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="column"&gt;
      &lt;div class="portlet"&gt;
          &lt;div class="portlet-header"&gt;Links&lt;/div&gt;
          &lt;div class="portlet-content"&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I want to happen is for the portlets to switch or exchange places when placed in a different column (so the portlet that is already in the column the currently dragged portlet came into goes to where the dragged portlet came from.) </p>
  
  <p>My research lead me to a <a href="http://forum.jquery.com/topic/shift-the-content-using-jquery-ui-portlets" rel="nofollow">similar question</a> with no answer, but I haven't found the answer for this question anywhere.</p>
  
  <p>I know there is documentation (found <a href="http://api.jqueryui.com/sortable/" rel="nofollow">here</a>) about the Jquery UI sortable options, methods, and events.  I think this is where my problem can be solved my dilemma is that I'm new to these things and am not sure where to start or where to go from there.  I have somewhat of an idea of what events should probably be used, but am not sure how to use them.</p>
  
  <p>I think the <a href="http://api.jqueryui.com/sortable/#event-over" rel="nofollow">over event</a> would be useful because my understanding is it will tell us that a portlet has been dragged to a new column. The ui object that is sent with the over event has a property sender which tells us what sortable the portlet came from; that sortable should be the destination of the other portlet which was already in the column the current dragged portlet just moved into. I also think the ui.item property would be useful as well so that if you could get the jquery objects within a column you can tell which one recently got added and which one was already there. </p>
  
  <p>This is about as far as I understand it.</p>
  
  <p>Your answers would be much appreciated. :)</p>