Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function(){
- $("#menu").on("click","a", function (event) {
- event.preventDefault();
- var id = $(this).attr('href'),
- top = $(id).offset().top;
- $('body,html').animate({scrollTop: top}, 1500,
- function(){
- $('.menu').removeClass('menu_state_open');
- });
- });
- });
- (function($){
- $(function() {
- $('.menu__icon').on('click', function() {
- $(this).closest('.menu').toggleClass('menu_state_open');
- });
- });
- })(jQuery);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement