Tag: ajax
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.
- Hide the album menu under a button, a la a mobile menu.
- Use AJAX to reload only the portion of the page containing the gallery.
- Push each new URL into the browser history, so that the back button works and individual albums can be bookmarked.