I am using jQuery.queue() for the first time and haven't quite grasped it. Could someone please point out what I'm doing wrong?
Looking in firebug I am still seeing my POST requests firing at the same time - so I'm wondering if I'm calling dequeue() in the wrong place.
Also - how can I get the queue length?
The reason I need to queue these requests is that it gets fired on click of a button. And its possible for the user to click multiple buttons in quick succession.
Tried to strip out the basic structure of my code:
$("a.button").click(function(){
   $(this).doAjax(params);
});
// method
doAjax:function(params){ 
   $(document).queue("myQueueName", function(){
     $.ajax({
       type: 'POST',
       url: 'whatever.html',
       params: params,
       success: function(data){
         doStuff;
         $(document).dequeue("myQueueName");
       }
     });
   });
}
 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    