before ajax doesn't work?

before ajax doesn't work?

 
In these following codes $('#loading').('display', 'block'); doesn't work. What should I do?
 
 
  1.  $('#loading').('display', 'block');
  2.  jQuery.support.cors = true;
  3.   $.ajax({
      type: "POST",
      url: "proxy.php",
      dataType: "xml",
      data: { source: "lastfm", wanted: keyword},
      success: parseXml,
      error: function(xhr, ajaxOptions, thrownError){
          alert(xhr.status);
                   alert(thrownError);
      }
      });









 
  1. $.ajax({
    type: "POST",
    url: "proxy.php",
    dataType: "xml",
    data: { source: "lastfm", wanted: keyword},
    beforeSend: function(){
    $('#loading').css('display', 'block');
    },
    success: parseXml,
    error: function(xhr, ajaxOptions, thrownError){
    alert(xhr.status);
    alert(thrownError);
    }
    });