Hi,
The correct solution is to add return false from your click event. This cancels the event and the page does not refresh.
$(document).ready(function() {
$('a').click(function(){
$('img').attr({ src: 'Tulips.jpeg', alt: 'cover2' });
return false;
});
});
Note that you should not set your href to '#' as this results in the page scrolling to the top when the link is clicked.