Created
January 9, 2018 16:13
-
-
Save krillo/81685b545852028de5a6278213ce0170 to your computer and use it in GitHub Desktop.
Magento2 jquery scroll to
This file contains 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
<script type="text/javascript"> | |
require(['jquery'], function (jQuery) { | |
jQuery(document).ready(function ($) { | |
$('#cpa-scroll-to-desc').click(function (event) { | |
event.preventDefault(); | |
$('html,body').animate({ | |
scrollTop: $(".box-collateral").offset().top - 120}, 'slow'); | |
}); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment