How to cancel/undo onclick once done
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/14637427/how-to-undo-an-onclick">How to undo an “onclick”</a>  </p>
</blockquote>



<p>I'm auto embedding YouTube video.</p>

<p>When clicking on the preview picture, it hides the preview and shows the video.</p>

<p>I want to go back to the preview when people are clicking somewhere else out of the video.</p>

<p>I have this :</p>

<pre><code>&lt;div onclick=\"$(this).html(decodeURIComponent('$embed'));\" 
        style='cursor: pointer;'&gt;
&lt;img src='$vignette' style='width:150px; cursor: pointer;'&gt;
&lt;img class='play' src='https://s-static.ak.fbcdn.net/rsrc.php/v2/yG/r/Gj2ad6O09TZ.png'&gt;
</code></pre>

<p></p>

<p>and tried this but I'm pretty sure I'm in the wrong way:</p>

<pre><code>$(function() {  

        $('html').click(function() {
        $("#iframetoclose").hide(); 
    }); });
</code></pre>

<p>I think the best way would be to reload something. I don't know how to start. Could you please help me ?</p>

<p>Thank you !</p>
