added scrolling logic to example3.html