title: AJAX explained in detail
body: <p>I found allot of examples of AJAX and I think I can get some code with it to work on my own. If only I knew what the use of all the terms of the AJAX code where. </p>
  
  <p>I think in general it lacks the availability of these guides or special pages where constructed code is explained in detail for new programmers. </p>
  
  <p>This would help enormously because of the misunderstanding of the syntax in many cases. Me for example spend 8 hours a day on my internship to learn PHP, Jquery, HTML from scratch and there is allot of information out there but its not structured and in most cases to technical. Any tips on that maby ? :)</p>
  
  <pre><code>$.ajax({
  type: 'POST',
  url: 'http://kyleschaeffer.com/feed/',
  data: { postVar1: 'theValue1', postVar2: 'theValue2' },
  beforeSend:function(){
  // this is where we append a loading image
  $('#ajax-panel').html('&lt;div class="loading"&gt;&lt;img src="/images/loading.gif" alt="Loading..." /&gt;&lt;/div&gt;');
  },
  success:function(data){
  // successful request; do something with the data
  $('#ajax-panel').empty();
  $(data).find('item').each(function(i){
    $('#ajax-panel').append('&lt;h4&gt;' + $(this).find('title').text() + '&lt;/h4&gt;&lt;p&gt;' + $(this).find('link').text() + '&lt;/p&gt;');
  });
  },
  error:function(){
  // failed request; give feedback to user
  $('#ajax-panel').html('&lt;p class="error"&gt;&lt;strong&gt;Oops!&lt;/strong&gt; Try that again in a few moments.&lt;/p&gt;');
  }
  });
  </code></pre>