weshatch

"la la la la la"

Wordpress

  • WordPress Scrubber Gallery

    A custom WordPress gallery. This version modifies the default WP gallery with an “image stack” that you can hover over and scrub through to view. I made a simple jQuery plugin to handle the scrubbing part, while the WP hook handles the HTML part.

    https://gist.github.com/3932805
  • WordPress: User Radio Buttons

    I added a column to the Users screen in the WordPress backend with a radio button toggle. The toggle’s value is stored by passing it via ajax when clicked.

    https://gist.github.com/3648737
  • WordPress general.php

    A general “WordPress reset” that I use in projects. I like to think of it as akin to a CSS reset. The idea is spun from the stresspress.php basic WordPress-extending file.

    https://gist.github.com/4138255

jQuery plugins

  • 3-State Sticky Column

    This here thang’ provides three separate states to manage a sticky DOM element. It can be flush to the top of its container, floating (as the page is scrolled down), or flush to the bottom of its container (for example, when a footer scrolls into view and pushes the bottom up). It doesn’t rely on .scrollTop() so it’s more efficient and doesn’t create a jerky scrolling effect.

    https://gist.github.com/4035708
  • WordPress Scrubber Gallery

    A custom WordPress gallery. This version modifies the default WP gallery with an “image stack” that you can hover over and scrub through to view. I made a simple jQuery plugin to handle the scrubbing part, while the WP hook handles the HTML part.

    https://gist.github.com/3932805
  • Tabbify

    A simple jQuery plugin (with sample CSS/HTML) that manages a “tabbed” interface. I use various incarnations of this in many of my projects.

    https://gist.github.com/2760700
  • Full-screen Image Rotator

    As the name says, a simple rotator plugin. There’s a bit of related CSS (w/js fallback) to place the images into the entire browser’s viewport. (Note: I’m currently re-developing this)

  • Flexi-Carousel

    With all the websites now designed to accommodate a variety of screen- and device sizes, it was necessary to create a carousel which could dynamically adapt its width. This carousel will grow or shrink alongside a site that’s resizing via css media queries.

    https://github.com/apathetic/flexicarousel
  • Image Popup

    Not Lightbox, nor ThickBox, nor the like. But it’s basically a very lightweight, svelte version thereof. I wrote it because I wanted something small and dedicated, designed to only do one thing – display images. The reason it’s so small is that there is no code / hacks to support older, non-CSS3 compliant browsers.

    https://gist.github.com/3932930
  • ImageBook and Gallery

    A simple gallery / image rotator. Just a sketch of something I had once done and wanted to put somewhere.

    https://gist.github.com/3077930

Javascript snippets

  • Background Resizer

    I made this quite a while ago. It works well, but has been superseded by CSS3’s capabilities (ie. background-size:cover).

    https://gist.github.com/9933205b335e0a0b3337
  • Structuring Javascript

    A really nice pattern for organizing Javascript on a page. Doesn’t clutter up global namespace, has public / private methods, and is all-around groovy. Borrowed from a jQuery mailing list.

    https://gist.github.com/3932743