After reviewing your input, it appears that This Link
satisfies your requirements perfectly. The code snippet below showcases how they achieve this functionality on their website.
// activating zoom feature
if( image.originalWidth > wrapperWidth ){
$(settings.activeImageId).width(wrapperWidth).height(wrapperHeight).hover(function(){
// enlarge image
$(this).addClass('zoomed').width(image.originalWidth).height(image.originalHeight);
$activeWrapper.mousemove( function(e){
var localX = ~~(((e.pageX - $activeWrapper.offset().left)/wrapperWidth) * 100);
var localY = ~~(((e.pageY - $activeWrapper.offset().top)/wrapperHeight) * 100);
if( localY > 100 ){ localY = 100; }
var fromLeft = (image.originalWidth - wrapperWidth) * localX/100;
var fromTop = (image.originalHeight - wrapperHeight) * localY/100;
//console.log( fromLeft,' :: ', fromTop);
$(settings.activeImageId).css('left', -fromLeft+'px').css('top', -fromTop+'px');
});
},
function(){
// shrink image
$(this).removeClass('zoomed').width(wrapperWidth).height(wrapperHeight);
$activeWrapper.unbind('mousemove');
});
}
}
Additionally, they utilize the following CSS rule:
#active-wrapper .zoomed {
left: 0;
position: absolute;
top: 0;
}
This controls the positioning of the element on the page.