Skip to content

Instantly share code, notes, and snippets.

@ignacioribes
Last active August 19, 2022 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ignacioribes/740138848d37bb0c305c0d8cb798fb37 to your computer and use it in GitHub Desktop.
Save ignacioribes/740138848d37bb0c305c0d8cb798fb37 to your computer and use it in GitHub Desktop.
Scroll to top tab elementor wordpress
<script type="text/javascript">
// Scroll to tab top
jQuery('.elementor-tab-title').on('click', function (e) {
var idName = jQuery(this).attr('id');
console.log(idName)
setTimeout(function (){
// Code you want to delay or you can call the function reference directly instead of defining one
jQuery('html, body').animate({
scrollTop: jQuery("#" + idName).offset().top
}, 'slow');
}, 500);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment