Conquering scrollbars

image of tangled scroll

So suppose you want to fix the sidebar on a Twenty Fifteen WordPress site, because most of the time it’s going to be short enough to fit entirely on the screen. And suppose you don’t want the nice wide scrollbar Internet Explorer (even 11) will put down the edge of your sidebar whether or not scrolling is happening or even possible. Let’s talk about that.

Gilding the Gallery 3: Ajaxifying the filterable gallery

Last time we set up the PHP (slash HTML, slash CSS) to dynamically generate Media Library Assistant gallery shortcodes and an album menu. Everything works without any JavaScript. Today we’re going to add JavaScript, with jQuery, to do three things.

  1. Hide the album menu under a button, a la a mobile menu.
  2. Use AJAX to reload only the portion of the page containing the gallery.
  3. Push each new URL into the browser history, so that the back button works and individual albums can be bookmarked.