When the page loads the first time the links don't work

When the page loads the first time the links don't work

Hi I have the following code with Jquery, and when the fee the first time in the browser and I click on the links do not work but if I click several times all goes well, this happens.

The first time when I clic on the link "Move me" you can see in the page: Resultado = filaX.undefined and nothing happen but the second time whe I clic on the link work fine

This is the code:

  1. <html> 

  2. <head>
  3.     <link rel="stylesheet" href="css/bootstrap.min.css">
  4.     <!-- Optional theme -->
  5.     <link rel="stylesheet" href="css/bootstrap-theme.min.css">
  6.     <!-- Latest compiled and minified JavaScript -->
  7.     <script src="js/bootstrap.min.js"></script>
  8.     <script src="jquery-1.11.2.js"></script>
  9.     <script>
  10.         $(document).ready(function() {
  11.             $(".filaMover").click(function() {
  12.                 var row = $(this).closest("li");
  13.                 $("p").append("<b>" + row.attr("id") + "</b>.");
  14.                 $("p").append("<b>" + row.parent().attr("id") + "</b>.");
  15.                 var lista = row.parent();
  16.                 row.detach();
  17.                 if (lista.is("#lista1")) {
  18.                     $("#lista2").append(row);
  19.                 } else {
  20.                     $("#lista1").append(row);
  21.                 }
  22.                 row.fadeOut();
  23.                 row.fadeIn();
  24.             });
  25.         });
  26.     </script>
  27.     <meta charset="utf-8">
  28.     <title>This is a jquery test</title>
  29. </head> 

  30. <body>
  31.     <p>resultado = </p>
  32.     <ul id="lista1" style="display: inline" class="displayTable list-group">
  33.         <li id="fila1" class="list-inline"> 
  34.             <div style="float:left"> FILA 1 </div>
  35.             <div style="float:left"> FILA 1 </div>
  36.             <div>
  37.                 <a href="#" id="fila1Mover" class="filaMover">&nbsp; Move Me</a>|
  38.             </div>
  39.         </li>
  40.         <li id="fila2" class="list-inline">
  41.             <div style="float:left"> FILA 2 </div>
  42.             <div style="float:left"> FILA 2 </div>
  43.             <div>
  44.                 <a href="#" id="fila2Mover" class="filaMover">&nbsp; Move Me</a>|
  45.             </div>
  46.     </ul>
  47.     </li>
  48.     <li id="fila3" class="list-inline">
  49.         <div style="float:left"> FILA 3 </div>
  50.         <div style="float:left"> FILA 3 </div>
  51.         <div>
  52.             <a href="#" id="fila3Mover" class="filaMover">&nbsp; Move Me</a>|
  53.         </div>
  54.     </li>
  55.     </ul>
  56.     <caption>Lista2 2</caption>
  57.     <ul id="lista2" style="background-color: Yellow; margin-top: 30px;" class=" displayTable">
  58.     </ul>
  59. </body> 

  60. </html>

Please help