How to recover an active div
<p>I try to use the jquery flip to display information on an div flip.</p>

<p><a href="http://jsfiddle.net/AdaKR/" rel="nofollow">JSFIDDLE</a></p>

<p>I have a first div called "workListId", under a second div called "workId".
Under the div workId, two another div called "workDataId" and "workFlipId".
Under the div workDataId, two another div called "workDescriptionId" and "workURLId"</p>

<p>I have a problem with the div workDescriptionID.
If I flip the div in the order, I see the description in order too.
But if Iflip the third div(for example), I see the description of the first div.</p>

<p>I think the problem is about this line but I don't know to resolve it :</p>

<pre><code>elt.html($('.workData').html());
</code></pre>

<p>So see my code below :</p>

<pre><code>$(function(){

  // A - CONSTRUCT THE DIV
  for ( var i in works ){

    // work div
    $('&lt;div/&gt;', {
      'id' : 'workId' + i,
      'class' : 'work'
    }).appendTo("#workListId");
    // workFlip div
    $('&lt;div/&gt;', {
      'id' : 'workFlipId' + i,
      'class' : 'workFlip'
    }).appendTo("#workId" + i);

    // workData div
    $('&lt;div/&gt;', {
      'id' : 'workDataId' + i,
      'class' : 'workData'
    }).appendTo("#workId" + i);

    // workDescription div
    $('&lt;div/&gt;', {
      'id' : 'workDescriptionId' + i,
      'class' : 'workDescription'
    }).appendTo("#workDataId" + i);

    // workURL div
    $('&lt;div/&gt;', {
      'id' : 'workURLId' + i,
      'class' : 'workURL'
    }).appendTo("#workDataId" + i);

    // Insert the content in each div  
    $("#workFlipId" + i).html(path.pathBegin + works[i].image + path.pathEnd);
    $("#workDescriptionId" + i).html('&lt;p&gt;' + works[i].description + '&lt;/p&gt;');
    $("#workURLId" + i).html('&lt;a href="' + works[i].website + '"&gt;Read more...&lt;/a&gt;');

  }//End for


  // B - CONSTRUCT THE DIV FLIP

  /* The code is executed once the DOM is loaded */
  $('.work').bind("click",function(){

    // $(this) point to the clicked .workFlip element (caching it in elem for speed):
    var elt = $(this);

    // data('flipped') is a flag we set when we flip the element:
    if(elt.data('flipped'))
    {
      // If the element has already been flipped, use the revertFlip method
      // defined by the plug-in to revert to the default state automatically:
      elt.revertFlip();

      // Setting the flag:
      elt.data('flipped',true);
    }// End if
    else
    {
      // Using the flip method defined by the plugin:
      elt.flip({
        direction: params.direction,
        color: params.color,
        speed: params.speed,
        onBefore: function(){
          // Insert the contents of the .workData div (hidden from view with display:none)
          // into the clicked .workFlip div before the flipping animation starts:
          elt.html($('.workFlip').siblings('.workData').html());

        }
      });// End $this.flip

      // Setting the flag:
      elt.data('flipped',true);
    }// End else
  });// End function work

});// End function
</code></pre>
