October 25, 2016

Site updates October

A work in progress summary to date

This month I’ve been focusing on making my website more aligned to the user experience most of us will be familiar with on platforms such as Twitter and Facebook. After some consideration, I decided to eliminate any need for Javascript frameworks throughout my website and instead develop some relatively simple progressive enhancements for the homepage feed.

What I learnt was that in order to trigger a scroll to a specific element on the page did not require anything more than a now widely supported function called scrollIntoView. Whilst the smooth scroll part isn’t supported in all browsers, pretty much all browsers will fulfil the primary purpose of the function: to scroll into view the specified element on the visible area of the browser window.

So there you have it in one line of code a scroll to function without needing to resort to hefty frameworks!