the second one is simply loading the link as a page, not into the #place div
This is because you did not prevent the click event on the a
by using preventDefault()
. Try this:
$('.tab a').click(function(e) {
e.preventDefault();
var location = $(this).attr('href'), $place = $('#place');
$place.hide(500, function() {
$place.load(location, function() {
$place.show(500);
});
});
});