Hi. I am creating a portfolio page for m personal site. I have a slider with approx 20 anchors that link to projects I have worked on, each one contains a client logo that when clicked should load some html content then fade that content into a container div on the same page.
I have been advised to use the JQuery method load() which seems straight forward. The question I have is do I have to repeat the following code for each of the 20 anchors as the url is different for each one or is there a more efficient way?
$('a#project1').click(function() {
$('#work').load('ajax/project1.html');
}
Also would I have to use the unload() method first to ensure the div I am loading into is empty? Many thanks in advance.