Q:

Can an Ajax call be triggered by a text link?

I completed a small tutorial-example using a drop down list that loads, with Ajax, some PHP pages. 
My question is, can I use a text link instead of a drop down list? If so, how does the code change?
$(document).ready(function() {
  $('#category').change(function() {

    var val = $(this).val();
    $('#firstresult').empty().addClass('loading').load(val + '.php', function(){
      $('#firstresult').removeClass('loading') 
    });

  });
});

A:

$(document).ready(function() {
  $('#yourLink').click(function(e) {
     e.preventDefault();//so the link doesn't try to go somewhere
     var val = $(this).text();  //get value from the TEXT of your link

     $('#firstresult').empty().text('loading').addClass('loading');  //put 'loading' in your firstresult div and change the class to loading
     $('#firstresult').load(val + '.php', function(){  
      //load firstresult with what your php page returns
      $('#firstresult').removeClass('loading') 
    });

  });
});

