title: load jw player on click
body: <p>I'm trying to do the following:</p>
  
  <p>Load a page without the player. When the user clicks certain element (ie a link), then the player should load in the predetermined div.</p>
  
  <p>This is the code I have so far without much luck:</p>
  
  <pre><code>&lt;div class="player-audio"&gt;
      &lt;div id='mediaplayer2'&gt;&lt;/div&gt;
  
      &lt;a href="#" id="btn_audios"&gt;view audios player&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $("#btn_audios").click(function() {
          jwplayer('mediaplayer2').setup({
              'flashplayer': 'jwplayer/player.swf',
              'id': 'playerID2',
              'width': '400',
              'height': '240',
              'playlistfile': 'audios.xml',
              'playlist.position': 'bottom',
              'playlist.size': '216',
              'controlbar': 'top',
              'skin': 'jwplayer/skins/yellow-player/yellow-player.zip'
            });
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The idea would be that when the user clicks on "view audios player" link, the player loads into the "mediaplayer2" div. This same code works perfectly if I load the player the usual way (when the page loads).</p>
  
  <p>Is it possible what I'm trying?</p>