Second Suggestion for Mod-Improovement


this template Scroll to top button can be improoved by changing
<a class="am-button">
<a class="am-button_toTop">


const button= document.querySelector('.am-button')


const button= document.querySelector('.am-button_toTop')

Otherwise the first Element with a class of “am-button” will receive this function to scroll to the top . This can be undesired. The Template should make sure the only Element to scroll to the top is the one within this Mod

The JS will search for am-button all across the entire webpage

Great suggestion – we’ve updated to make the selector specific to the mod. Thank you!