before ajax doesn't work?
In these following codes $('#loading').('display', 'block'); doesn't work. What should I do?
- $('#loading').('display', 'block');
- jQuery.support.cors = true;
- $.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);
}
});
- $.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);
}
});