An Office service that supports add-ins to interact with objects in Office client applications.
Sorry, it's my fault. The question is incorrect. I was helped to solve it on stackoverflow.com . The question is closed.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi!
I have a main page on which the mouse wheel scroll works in main.js.
<script src="~/js/main.js"></script>
// Wheel event
$body.on('wheel', function (event) {
var $theme_panel = $('#theme_panel');
if ($theme_panel) {
var $style = $theme_panel.style.display;
if ($style != 'none') {
return;
}
}
...
}
There is also a pop-up window that appears when you click on the image on the main page.
I need to turn off scrolling with the mouse wheel on the main page as soon as the pop-up window appears and turn on scrolling again when the pop-up window closes.
The pop-up window has id="theme_panel":
<ul class="posts" id="theme_panel">
I just need to somehow figure out when the pop-up window appeared on stage and when it disappeared.
I thought I needed to check for display != 'none' (or maybe something else), but at startup I keep getting an error in the line var $style = $theme_panel.style.display;:
main.js:292 Uncaught TypeError: Cannot read properties of undefined (reading 'display')
Tell me, what am I doing wrong?
Thanks!
An Office service that supports add-ins to interact with objects in Office client applications.
Sorry, it's my fault. The question is incorrect. I was helped to solve it on stackoverflow.com . The question is closed.