Output Youtube video
<p>I need to output youtube video via Ajax in my rails 3 App. There are other ways of doing it, but for js.erb, i need to do it in a different way.I want to display youtube video using jquery's html() method or some other method. I tried this:</p>

<pre><code>$("#bt").click(function () {

      $("#vid").html("
   &lt;object width="640" height="390"&gt;&lt;param name="movie" value="http://www.youtube.com/v/9QS0q3mGPGg?fs=1&amp;amp;hl=en_US&amp;amp;rel=0"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;"+"&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/9QS0q3mGPGg?fs=1&amp;amp;hl=en_US&amp;amp;rel=0&amp;autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="390"&gt;&lt;/embed&gt;&lt;/object&gt;");
    });
</code></pre>

<p>But it is not displaying the video.Is there a way to do it?</p>
