title: Interval code with transform option added using Jquery is working only one time
body: <p>I have trouble with following code:</p>
  
  <pre><code>var permission = 0;
  
  setInterval(function() {size()}, 5000);
  
  function size(){
  
  if (permission == true){
  
      if (turn == 0){
  
          $(document).ready(function(){
  
  
              $('img#me').css('transform', 'rotateX(360deg)');
  
              turn = 1;
  
          });
  
      }
      else{
  
          $(document).ready(function(){
  
              $('img#contact').css('transform', 'rotateY(360deg)');
  
              turn = 0;
  
          });
  
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The rotations are working only one time for each element.
  After one rotation next should do in about 5 seconds but it isn't.
  I have looked for suggestions in the internet but haven't found anything helpful.</p>
  
  <p>Thanks for help.</p>