I am trying to change the body of overflowY to "hidden" through a JavaScript function. I tried both of the following:
document.body.style['overflow-y'] = 'hidden'; document.body.style.overflowY = "hidden";
In both cases, this did not work. However, in both cases, using only overflow without X or Y works fine!
Is there a way to change only overflowY or overflowX properties?
Phil source share