I'm pretty good with jQuery but when I get to stuff like this I need a little help.
So I want to shorten this code:
$(function() {
$('#experience_nav').click(function() {
$('#contentWrap').load('files.html #content_experience', function() {
$(this).hide().fadeIn();
$('#content_experience').siblings().fadeOut();
});
return false;
});
$('#aboutme_nav').click(function() {
$('#contentWrap').load('files.html #content_aboutme', function() {
$(this).hide().fadeIn();
$('#content_aboutme').siblings().fadeOut();
});
return false;
});
$('#recentclients_nav').click(function() {
$('#contentWrap').load('files.html #content_recentclients', function() {
$(this).hide().fadeIn();
$('#content_recentclients').siblings().fadeOut();
});
return false;
});
$('#contactme_nav').click(function() {
$('#contentWrap').load('files.html #content_contactme', function() {
$(this).hide().fadeIn();
$('#content_contactme').siblings().fadeOut();
});
return false;
});
});
So that I don't have to basically keep calling the same thing for each different instance.
Any Help at all is great! Even just telling me it can't be done! :-)