0
My problem is this.
<a href="#saibamais" class="scroll-to">
Saiba Mais
</a>
<div id="saibamais"></div>
$('a.scroll-to').on('click', function (e) {
e.preventDefault();
$('html,body').animate({scrollTop: ($($(this).attr('href')).offset().top - 0)}, 600);});
On screens larger than 992 works normally, but changing the resolution from 992 down no longer works.
Works on normal desktop, but when I lower the screen it just doesn’t work anymore,
– LuizCanassa
Which browser are you using? I tested it at 320 for 480 and worked normal.
– LeAndrade
I tested in firefox, Chrome, operates and nothing. I also tested directly by mobile and nothing. It works scroll, but the smoothness effect does not apply.
– LuizCanassa
Strange, what seems to occur there with vc is that the function does not perform. Try to put an Alert in the function after the 600); Alert("testing"); to see if it runs.
– LeAndrade
I’ve done it, and it’s working.
– LuizCanassa
Cara ta very strange this, if executed the Alert then the function is working. Soon the effect within the function should work.
– LeAndrade
I have the gift to make something right go wrong gasheuhiasegh PHP that says it.
– LuizCanassa
This e. preventDefault() is not necessary.
– LeAndrade