Created
November 9, 2016 11:59
-
-
Save luisfelipe-dev/967989ffcf747ee303c768b77f7832ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| $('a[href^="#"]').on('click',function (e) { | |
| e.preventDefault (); var target = this.hash, | |
| $target = $(target); $('html, body').stop().animate ({ | |
| 'scrollTop': $target.offset().top | |
| }, 1000, 'swing', function () { | |
| window.location.hash = target; | |
| }); | |
| }); | |
| }); | |
| Quando o scroll nao vai ate a classe que voce escolheu e fica indo só nas acimas , faça o seguinte! | |
| Coloque ' overflow: hidden ' nas classes para fazer funcionar tudo normalmente :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment