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')
});
});
});
1 Answer