check if element exists within parent element
<p>I'm embedding and appending a youtube video to a div by using the href value and adding it to youtube.com/embed/ +hrefvariable. I just need some guidance in how to check if the youtube video is already in the div, to not run the click function that appends it there. I'm thinking using .length() with the parent div?</p>

<p>Here's the appending function:</p>

<pre><code>$(function () {
    $(".youtube").click(function (a) {
        a.preventDefault();
        a = '&lt;iframe src="http://www.youtube.com/embed/' + $(this).attr("href") + '?&amp;iv_load_policy=3&amp;autoplay=1#t=0m12s&amp;rel=0" frameborder="0" allowfullscreen &gt;&lt;/iframe&gt;';
        $("#currentvid").html(a);
        $("#currentvid").animate({
            opacity: 1
        }, 1E3);
        return !1
    })
});
</code></pre>
