Set up popup scrolling function