Showing all articles matching javascript

Lightweight custom sharing buttons

Last month I wrote a post about Shareaholic's sharing buttons and the extra page weight that comes with them. Rather than simply moan about the situation I decided to build my own sharing buttons tool. It's incredibly simple and offers no particular features, but it's very lightweight, simple to implement and a good starting point.

Wednesday 7th of September 2016

Read more

The cost of sharing your website on social media

I built a webpage recently. It was mostly just SVGs and text, so I checked the total page size with developer tools and was pleased to discover it came in under half a megabyte. Efficiency and small page size! The Holy Grail of all frontend developers (it should be, anyway).

Then I remembered I had to add some social media sharing buttons. For historical reasons with the client, I chose Shareaholic's sharing buttons. Then I checked the page size again.

  • Initial size of page: 445 KB
  • Size of page after adding Shareaholic share buttons: 1504 KB

What. The. What.

Sunday 7th of August 2016

Read more

A plugin to make a slider button

I had to build a page the other day that contained a sort of sliding selector element containing two text links side by side, that controlled the show/hide status of two panels below it. At the time I was a bit rushed so I built it in a way that worked and suited the design, but I've since had time to come back and expand on that idea with a proper jQuery plugin version.

Monday 27th of April 2015

Read more