写真のズーム効果を作成しています
<table>
<tr>
<td><img class='source-img' src='a.png' ></td>
20 more same TDs
</tr>
20 more TRs
</table>
<div id="magnifier" style="position:absolute;"></div>
1- ズームが正常に行われました 2- 拡大鏡の上部/左に問題があり、拡大鏡を source-img の右側に配置しました。
$("source-img").mousenter(function(){
$("#magnifier").css({
top: $(this).top,
left:$(this).offset().left()+$(this).width()+5//to improve left value
});
});
問題: source-img がブラウザーの一番左にある場合、source-img の右側に拡大鏡を表示したい、またはその逆の場合、現在、一番左の source-img 拡大鏡に bcz が表示されますが、表示されません。