Custom Code Cancels Webflow Interactions

Hello everyone!

I’ve seen this once or twice on the forums but with no solution. Does anyone know why custom code seems to interfere with Webflow interactions sometimes?

My situation: I’ve got a client site which uses interactions to animate content out of the way, then bring new content into view. Interaction works fine… until I insert some jQuery to add a delayed “scroll to top” function. The reason for this custom code is because if the user has scrolled down to the bottom of the page and then clicks the trigger and the current content animates out and new content comes in, it brings the new content in too low and whatever’s at the top is missed.

jQuery inserted before closing of page:


$('.choice-block_trigger').click(function() {

    $("html, body").animate({ scrollTop: 0 }, "slow");
 }, 3500);
return false;});


The interaction is called Hotels IN and is triggered by the “Aller” text block with class of ‘.choice-block_trigger’.

If anyone knows how to ensure custom code doesn’t interfere with Webflow interactions, that would be amazing…

Here is my site Read-Only: [LINK](Webflow - Mon Doux Pays)