title: click function doesnot work after auto page refresh
body: <p>I am refreshing my page every 25 seconds using Javascript.But another Javascript for click function works fine before page refresh whereas after page refresh it doesnot work.</p>
  
  <p>HTML:</p>
  
  <pre><code> &lt;div id="refreshOnline"&gt;
      &lt;div id="refreshData"&gt;
      //Set of Functions
       &lt;a target="_blank" href="http://example.com/startgame.php?gname='.$key['gameName'].'&amp;player='.$_SESSION["uname"].'&amp;type=t20" class="btn btn-primary btn-sm popup-game" id="popup-game" &gt;Play Now!&lt;/a&gt;
    &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt; 
     //Script to refresh Div
     function show_data()
     {
      $('#refreshOnline').load('main.php #refreshData');
     }
      setInterval('show_data()', 25000);
  
     //Script to oprn link in new window
      $('#popup-game').click(function (event) {
      event.preventDefault();
      alert("Working");
       window.open($(this).attr("href"), "popupWindow","width=600,height=600,scrollbars=yes");
     });
  &lt;/script&gt;
  </code></pre>
  
  <p>Before refresh, link opens in new window whereas after execution of refresh script, link opens in new tab instead of new window.</p>