0
Guys, I have a bar that works as follows, when my scroll is on top of the div of the bars they will start to fill. I made the css, but I’m not able to do Jquery, some hint?
HTML:
<label for="barra"><h2>HTML </h2><span id="porcentagemhtml"></span></label>
<div class="container-barra">
<div class="barra"></div>
</div>
<label for="barra"><h2>CSS </h2><span id="porcentagecss"></span></label>
<div class="container-barra">
<div class="barra"></div>
</div>
<label for="barra"><h2>JAVASCRIPT </h2><span id="porcentagemjs"></span></label>
<div class="container-barra">
<div class="barra"></div>
</div>
<label for="barra"><h2>PHP </h2><span id="porcentagemphp"></span></label>
<div class="container-barra">
<div class="barra"></div>
</div>
<label for="barra"><h2>SQL </h2><span id="porcentagemsql"></span></label>
<div class="container-barra">
<div class="barra"></div>
</div>
CSS:
.container-barra{
width: 100%;
border: 0.1px solid;
border-radius: 15px;
}
.barra{
width: 0%;
height: 20px;
background-color: black;
border-radius: 15px;
}
jquery:
$(document).scroll(function(){
var posicao = window.pageYOffset;
if(posicao>=1287){
setInterval(encheBarra, 30);
}
});
// Chamada da Função
function encheBarra(){
}
Yes, like, when I got to the 1287 position of the screen, the bar was full. I was able to do Javascript with w3c’s Ex, but not in Jquery
– Tiago Silveira