Popup using iframe does not work after first time load

Popup using iframe does not work after first time load

I am trying to get a list of videoid and demo them using popup. however this works fine for first usage. The second time I load the page the popup does not work. The iframe is displayed after each img.

 <a href="#myPopup{{num}}" data-rel="popup" data-position-to="window" class="ui-corner-all ui-btn-inline">    <img src=" http://img.youtube.com/vi/{{videoid}}/default.jpg"> </a>
    <div data-role="popup" id="myPopup{{num}}" data-overlay-theme="b" data-theme="a" data-tolerance="15,15" class="ui-content">
  <iframe id="player" type="text/html" width="100" height="100" src=" http://www.youtube.com/embed/{{videoid}}??&rel=0&showinfo=0&autohide=1" frameborder="0"></iframe>
    </div>
  </div>