title: how to Stop previous ajax call sent in jquery
body: <p>i am working in rails 2
  I have an issue in how to stop previous ajax call on the same element.</p>
  
  <p>For example,</p>
  
  <p>i have categories dropdown which gets updated based on the blog type. 
  And i have clicked type twice , so 2 requests are being sent. Before my second req got over, if i have clicked on the category based on the first response to load sub categories and now the second response to load the categories got over and updated the categories. but the subcategories are the response of one of the category selected from the first response categories.</p>
  
  <p>How to stop the previous ajax call sent to fetch the categories.</p>