@ben,
Hi, I have a question about your script/code:
It works great but because I use a header-plugin that makes the header sticky, the accordion just positions itself under the header.
When I deactivate the plugin (sticky header) it works just fine.
Is there a way to add something like “100px from top” to the code?
I don’t understand a thing about coding so I would not know if it’s possible or where and how to put it in..
Thank you very much!
<script>
jQuery( document ).ready( function( $ ) {
$( ‘.elementor-tab-title’ ).click( function( ) {
var pane = $(this);
setTimeout(function(){
var $panel = pane.closest(‘.elementor-accordion-item’);
$(‘html,body’).animate({
scrollTop: $panel.offset().top
}, 500);
}, 500 );
});
});
</script>