title: set jquery delay in jquery form serialize variable
body: <p>This is my simple code for adding products in cart using ajax but when user clicked too fast then some of products are not added in cart.
  At the first line i fetch data from form using serializing after calling ajax and add product in cart.
  Now give me solution for it where i can put timeout or delay and something similar so execution halt for sometimes.</p>
  
  <pre><code>var datas = form.serialize();
  
              if(usefancy){
                  $.fancybox.showActivity();
              }
  
              $.getJSON(vmSiteurl+'index.php?option=com_virtuemart&amp;nosef=1&amp;view=cart&amp;task=addJS&amp;format=json'+vmLang,encodeURIComponent(datas),
              function(datas, textStatus) {
                  if(datas.stat ==1){
  
                      var txt = datas.msg;
                  } else if(datas.stat ==2){
                      var txt = datas.msg +"&lt;H4&gt;"+form.find(".pname").val()+"&lt;/H4&gt;";
                  } else {
                      var txt = "&lt;H4&gt;"+vmCartError+"&lt;/H4&gt;"+datas.msg;
                  }
  </code></pre>