Function to initialise nano scroller functionality