HTML5 shell game
<p>I'm creating a game, where there are three cups that need to shuffle. 
I created the HTML and CSS for the game but I'm stuck at moving the three cups with Javascript. </p>

<p>The problem is that two cups need to switch with each other, and having the shuffle effect also.(that you see the cups moving effect) I already found some information about shuffling the divs, but then you don't see the shuffeling effect..
I hope that someone can help me.</p>

<p>This is the code I tried, which worked but ofcource doesn't have the effect what I need.</p>

<pre><code>$(document).ready(function(){
$("#start").bind('click', shuffle);        
function shuffle(){
    $(".cupBox").each(function(){
        var divs = $(this).find('div');
        for(var i = 0; i &lt; divs.length; i++) $(divs[i]).remove();            
        //the fisher yates algorithm, from http://stackoverflow.com/questions/2450954/how-to-randomize-a-javascript-array
        var i = divs.length;
        if ( i == 0 ) return false;
        while ( --i ) {
           var j = Math.floor( Math.random() * ( i + 1 ) );
           var tempi = divs[i];
           var tempj = divs[j];
           divs[i] = tempj;
           divs[j] = tempi;
         }
        for(var i = 0; i &lt; divs.length; i++) $(divs[i]).appendTo(this);
    });                    
}
});
</code></pre>

<p>Link to <a href="https://jsfiddle.net/wpeg04g2/4/" rel="nofollow">JsFiddle</a></p>

<p>Thanks in advance!</p>