I needed to learn a little about the events triggered in the Customizer, and came up with a little script that prints events to the console log. This is specific to the Customizer’s event system.
Continue reading Observing the WordPress Customizer (wp.customize) Events
There are several good references about how to set up the Customizer to avoid refreshing the entire page with each change. There’s one here, and there’s some deeper explanation here. What’s not described much is how to map several settings to a single area of the page (called a Partial).
This tutorial will go into updating Partials that use several settings. I assume you have already done the other tutorials.
Continue reading WordPress Customizer, Selective Refresh and Partials for Multiple Settings
Everyone loves the parallax effect, and I’ve been swiping snippets of code to do it for a long time, but never really thinking about it too much. You load it, set some parameters, and that’s it. I was having a little glitch with one, and was tweaking it, and I started to wonder why the effect didn’t just start at one end of my image, and end at the other end.
After all, if I don’t show all the pixels, I’ve “wasted” all those network bytes to load the data, and all the memory to hold the data.
This parallax effect is stingy with network bytes.
Continue reading Yet Another Parallax Effect, but This One Wastes Fewer Pixels and Bytes.
Learning d3 events this afternoon. These are the notes I’m taking while I’m learning it. I hope it helps.
It’s called d3.dispatch. d3.dispatch(‘eventname1′,’eventname2’) returns an object that manages setting event handlers, and dispatching events. The event system isn’t global (unlike in most frameworks, where the event system appears to be globally available)- it’s contained entirely within the object.
Continue reading One Event Bus to Rule Them All! d3 Dispatch, the d3 Event System, Notes
This is a simple implementation of base 32 encoding and decoding that conforms to RFC 4648.