title: Replace one div with another - jquery
body: <p>I have 4 divs and in each one there are top and down arrows.
  If user click top arrow - current div change place with higher div and conversely.</p>
  
  <p>How can I do this?
  This code is for "bottom arrow" and doesnt work...</p>
  
  <pre><code>$("button.down").click(function(){
  
  var aDiv = $(this).parent();
  var dDiv = $(this).parent().next("div");
  
  $(this).parent().next("div").replaceWith(aDiv);
  $(this).parent().replaceWith(dDiv);
  
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/gjkhf81u/" rel="nofollow">http://jsfiddle.net/gjkhf81u/</a></p>