Any
$10
TBD
Nov 3, 2025
I need JavaScript that will offset element if it is near screen edge. I have found online this script and it works, but it moves my element in only one direction - if panorama pin is near top edge of screen. See example on this link:
On mouse over, panorama pins preview window is opened and if pin is near top of the screen window is offset down. This is the script i am using: [removed]me._preview_window.style.top=(me.__div.offsetTop>130)?"-135px":"20px";
I would like to know what those numbers represent and to expand this script it to offset element in all four directions when preview windows is near screen edge or in corners. In that case, window needs to be offset in two axis. Basically, idea is that preview window is never outside of the screen edge. Please send me your offer if you are capable of solving this. I can send you output files.