title: Automatically move div with javascript on delay
body: <p>I have the below piece of code that moves a  onto the screen when ?added is in the URL which works great. I now need to add a piece of code to it that then moves the  back over after 5 seconds. I have noticed there's a delay function but I'm not sure how to add it into the code. Can anyone help? Many thanks!</p>
  
  <pre><code>$(document).ready(
  function () {
      if (document.URL.indexOf("?added") &gt;= 0) {
          $('#popout-left-menu-container')
              .animate({
                  'right': '2px'
              }, 300);
      };
  });
  </code></pre>