Scroll to Top page

0
Hi team,   I need a widget which can help me to move/scroll back to the top of the page. I got an Widget “Scroll to top” but its not compatible with my Modular. I am using Mendix studio 8.12.0. Please advise me any widget for this functionality or the alternative  to achieve this functionality.   Thanks in Advance, Jahnavi
asked
1 answers
1

Hi Jahnavi,

if it doesn’t work for you, try  to use a javascript snippet , then put the following code inside it:

 

$(document).ready(function(){
   $('.elementToBeClickedClass').click(function(){
        $('html, body').animate({
               scrollTop: $(".elementToScrollToClass").offset().top
        }, 1000)
   })
});

elementToBeClickedClass : the class of the arrow or button that shows scroll to top 

elementToScrollToClass : The class of the element you want to scroll to 

Thanks,

Sufian.

answered