title: Javascript image timout
body: <p>Good day, i'm having a problem with my code, can't get to show the loading image for few seconds, while POST code is getting in database and gives backinformation to show.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("#poll_vote").click(function(){
  var answer = $("input.panswer:checked").val();
  var p_id = $("#p_id").val();
  
  $("#poll_load").html("&lt;tr&gt;&lt;td align='center'&gt;&lt;img src='/images/ajax/ajax4.gif'/&gt;&lt;/td&gt;&lt;/tr&gt;");
  
    $.ajax({
    type: "POST",
    data: "action=poll_vote&amp;p_id="+p_id+"&amp;answer="+answer+"&amp;module="+module+"",
    dataType: 'html',
    url: "/ajax.php",
    success: function(data)
    {
  
      $("#poll_content").html(data);
  
    }
    });
  
  
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>I would hope on your fast help, i'm begginer in java, so can't dicide it myself.</p>