Although, the thumb image gets always displayed in an empty window, as if there is no “return false”. If I click Back in the browser, I see that the big image has been indeed changed just before the link executed. Why is my “return false” not firing and preventing the browser from following the link?
That happens when the links don’t have the click event attached to them. Why would that happen? It happens when you attempt to add a click event when no body content yet exists.
If that is the cause, you need to place your jQuery code in a callback, so that jQuery can then execute your code after the body content becomes available.
$(function () {
// your jQuery code in here
});
If it’s not due to that, then we’ll need to see a test page that demonstrates the problem, so that the fuller context can be examined in which to find the actual cause.
Have you tried jQuery’s preventDefault method, instead of return false?
If that doesn’t help, there might be something elsewhere helping to cause the problem.
A test page that demonstrates the problem will help us to trace the issue down to its root cause.