Code Snippets

Bits and scraps of php and javascript that I keep using over and over. Some are WordPress functions and some are javascript scraps that do some special onpage magic.

Eliminating FOUT In New Browsers

Code Snippets - Opacity and FadeTo

Hide elements in the page until their dependencies are loaded using this simple technique

Google Docs Embed Script

Ever wanted to view a PDF in the body of a web page? With this short snippet, users can see your pdf in a web page using Google’s Document Viewer

[Updated] Add first and last classes to menu items

If you’ve ever wanted to make the first or last item in your navigation act or look differently than the rest, you’ve probably wanted to have a class to hang that functionality on. Now you can!

[Updated] How to hide the success message from Contact Form 7

Updated technique to hide the thank you message from Contact Form 7 with this easy snippet.
Not as elegant. The new solution is a jquery snippet to add to the site instead of the Contact Form 7 forms.