With "affected div" you mean the div with id "divname" whose content changes by using the Ajax .load() method?
This is because .click() can only bind to elements that exists at the moment the method is called. Everything that is added afterwards (like by using the .load() method) will not be covered by this .click() handler.
Solution: With jQuery pre 1.7 you should use .live() and starting with jQuery 1.7 you should use .on()
Code:
$('a').live('click', function() {
fragment = this.hash;
contentload(fragment);
});
// OR
$(document).on('click', 'a', function() {
fragment = this.hash;
contentload(fragment);
});