JQuery on click event over a dynamically created element
<p>I´m having problems with a JQuery on click event over a dynamically created element.</p>

<p>The code created dynamically is this:</p>

<pre><code>&lt;div class="container rounded"&gt;
   &lt;div class="message_area" style="background-color: #dff0d8;border:1px solid #d6e9c6; color: #3c763d"&gt;
       &lt;button class="close" type="button"&gt;x&lt;/button&gt;
            Ya esta suscrito a nuestras listas de envío, sus datos han sido actualizados.
   &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>And I´m trying yo change the height of a container (class bloqFormulario) when the client click on the close button.</p>

<p>I have tried these options:</p>

<pre><code>(function($){
    $(".close").click(function() {
        $(".bloqFormulario").height(200);   
    });
})(jQuery);



(function($){
    $(".message_area").on("click", "button", function() {
        $(".bloqFormulario").height(200);
    });
})(jQuery);
</code></pre>

<p>But I have no result.</p>

<p>Can you help me?</p>

<p>Thanks a lot.</p>