1
I made a program using Polymer and within one of the components in a specific area (the caption area of my chart) I want the scroll of the page not to work, is there any way to do this?
1
I made a program using Polymer and within one of the components in a specific area (the caption area of my chart) I want the scroll of the page not to work, is there any way to do this?
3
You can hide the scroll
when the mouse passes in a certain area, in my example I put to hide the overflow
while passing the <div id="azul">
.
var azul = document.getElementById("azul");
azul.onmouseover = function(){
document.body.style.overflowY = "hidden";
};
azul.onmouseout = function(){
document.body.style.overflowY = "auto";
};
#total{
height: 900px;
}
#amarela{
background-color: yellow;
height:50%;
}
#azul{
background-color: blue;
height:50%;
}
<div id="total">
<div id="amarela"></div>
<div id="azul"></div>
</div>
Source: https://stackoverflow.com/questions/7915882/disabling-mouse-scrolling
Browser other questions tagged javascript polymer
You are not signed in. Login or sign up in order to post.
So caique, I had seen some answers to similar questions the way Voce spoke, but in executing this is the return I have: "Uncaught Referenceerror: $ is not defined", I think it is due to being using Polymer, which makes me operating in shadow dom
– Thiago Outeiro Pereira Damasce
This error is because the solution I posted uses the Jquery library and it needs to be included in order to work:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
– Caique Romero
I changed my answer so she no longer depends on
jquery
see if it helps you ;)– Caique Romero