Edit: I forgot to mention, earlier you were grabbing XML data, if you want to use jquery it's often easier to just get the response as json. You can do this in the spotify api by appending .json to the requested resource.
The code above seems to be working for me. Make sure that you have jquery referenced before that block.
Here's a fiddle with a working sample:
http://jsfiddle.net/JfaEc/
var aRequest = function(){
$.ajax({
url: 'http://ws.spotify.com/search/1/album.json?q=hello'
}).success(function(response){
var albums = response.albums;
var result="";
for(var i=0,len=albums.length;i<len;i++){
var album = albums[i];
result= result + "<li>" + album.name + "</li>";
}
$("#results").html(result);
});
}
$(document).ready(function(){
$('h1').click(aRequest)
})