Last active
April 21, 2017 11:36
-
-
Save onokumus/e324c703d4dcfc2d294434fa74a59602 to your computer and use it in GitHub Desktop.
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 src="node_modules/metismenu/dist/metisMenu.js"></script> | |
<script> | |
var header_wrap_height = $('.header_wrap').height(); | |
$('.metismenu').metisMenu({ | |
toggle: false, | |
triggerElement: '.pricing-link', | |
parentTrigger: '.pricing-item', | |
subMenu: '.pricing-table' | |
}) | |
.on('shown.metisMenu', function (event) { | |
$('body,html').animate({ | |
scrollTop: $(event.target).parent('.pricing-item').position().top - header_wrap_height | |
}, 600); | |
}); | |
</script> |
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 src="/wp-content/themes/catalyst/node_modules/metismenu/dist/metisMenu.min.js"></script> | |
<script> | |
jQuery(document).ready(function () { | |
var header_wrap_height = jQuery('.header_wrap').height(); | |
jQuery('.metismenu').metisMenu({ | |
toggle: false, | |
triggerElement: '.pricing-link', | |
parentTrigger: '.pricing-item', | |
subMenu: '.pricing-table' | |
}) | |
.on('shown.metisMenu', function (event) { | |
jQuery('body,html').animate({ | |
scrollTop: jQuery(event.target).parent('.pricing-item').position().top - header_wrap_height | |
}, 600); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment