Note that there are some explanatory texts on larger screens.

plurals
  1. POonClick function only trigger once
    text
    copied!<p>I've searched a solution or an answer to get me close to the solution for my problem, without any luck. The problem is that I don't know what is actually causing this. I have the following HTML sructure :</p> <pre><code>&lt;body&gt; &lt;div class="showall"&gt; &lt;div class="comentwrapper" style="height:0; width:800px"&gt; &lt;/div&gt; &lt;div class="articol"&gt; Some article over here ! &lt;/div&gt; &lt;input type="button" id="adaugacomentariu" value="Adauga comentariul tau ..." onclick="addBlogComent()" style="float:left; margin-left:5px" /&gt;&lt;br /&gt;&lt;br /&gt; &lt;div class="showcomment"&gt; Coments go over here .. &lt;/div&gt; &lt;/div&gt; </code></pre> <p></p> <p>and the follwing JS code :</p> <pre><code>function addBlogComent() { $('.comentwrapper').animate({"height":"340px"}); $('.margine').delay(200).fadeIn(400); } function hideComent() { $('.margine').fadeOut(200); $('.comentwrapper').animate({"height":"0px"}); } $(function() { $('#addblogcoment').on('submit', function(e) { $('.aratamesaj').fadeIn(300); $.post('submitcomentblog.php', $(this).serialize(), function (data) { $('.showcoment').load("blogcoment.php"); $("#addblogcoment").find('input[type=text], textarea').val(""); $('.aratamesaj').delay(5000).fadeOut(800); $('.comentwrapper').delay(2000).fadeOut(200); }).error(function() { }); e.preventDefault(); }); }); </code></pre> <p>My problem is that after <code>.post()</code> and the <code>.load()</code> that <code>.onClick=""</code> is not animating the form anymore. </p> <p>I don't understand what can be the cause, because the form and the <code>button</code> is on the <code>.showall</code> <code>div</code> and I'm only <code>.load()</code>-ing something in <code>.showcomment</code> <code>div</code> which is a child of <code>.showall</code>. </p> <p>Maybe someone can see something I'm missing over here . </p> <p>There is a small <a href="http://jsfiddle.net/vZtp8/2/" rel="nofollow">fiddle</a> . Don't have the external resources, but that is not the problem, everything is posted and loaded properly.</p> <p>You can see the whole page at <a href="http://www.pitsol.ro/catalingutu/index.php?page=3" rel="nofollow">MyWebSite</a> .</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload