Loading JWplayer dynamically
<p>Hi and thanks for looking into this.</p>

<p>I have a code I've been working on to add videos to my site. All videos are from youtube. Once a user has clicked on submit, a link becomes visible. When clicking on it the user can preview the video.</p>

<p>One week ago I used the following to achieve this:</p>

<pre><code>$("#result").html('&lt;a href="javascript:initPlayer(\'http://www.youtube.com/watch?v=kXhy7ZsiR50\')&gt;Preview video&lt;/a&gt;&lt;br&gt;');
</code></pre>

<p>Everything worked fine. But today I was trying the script and the link doesn't appear anymore. The link works however fine if I do something like:</p>

<pre><code>&lt;a href="javascript:initPlayer('http://www.youtube.com/watch?v=kXhy7ZsiR50')"&gt;Preview video&lt;/a&gt;
</code></pre>

<p>Somewhere on the page.</p>

<p>I don't know why the call with jQuery doesn't work anymore. It worked fine when I was developing the website. I tried it on different browsers, but with the same result in the end.</p>

<p>Anyone any idea how to solve this? I'm starting to pull out my hair. :)</p>

<p>Thanks in advance.</p>
