With jQuery you can make an ajax request like this:
request=$.ajax({
url: "test.html",
});
request.success(function(){
alert('Yay!');
});
However, let’s say I didn’t want immediately make the ajax request. I just wanted to define it and bind it to an event. Is there a way to do that?
Would this suit your need?