I am currently working on a website that features a unique lightbox, which serves as a "View Source" button. When clicked, the background darkens and the source code appears; however, scrolling is only possible if the mouse hovers over a specific div
(in this case, pre
). I want the ability to scroll the main lightbox even when my mouse is positioned in the top corner of the page. To address this issue, I have added the following CSS:
overflow-x: hidden;
overflow-y: scroll;
I believe solving this problem may require some JavaScript or jQuery knowledge, but I am not sure where to start.
You can see the lightbox feature in action on this page by scrolling down and clicking 'View Full Code'.
Does anyone have any suggestions on how to achieve this functionality?