jQuery: Selecting only the first level children

June 22, 2010

Using the .not() operator with jQuery it is possible to select only the first level of children of an element. This could come in handy on a menu for instance. Let’s see what the menu code looks like. Item Sub Sub2 Sub3 Item2 Item3 We are trying to get ul li, but not ul li

PHP: Show error on screen when disabled by php.ini

June 16, 2010

It is quite common to run into situations where PHP errors are suppressed or written to a log file somewhere on a live, non-development server. If you are troubleshooting and need to see the error that can be a pain. Luckily PHP and Apache have provided us with two great workarounds. The first happens through

PHP: Add Google Analytics to an entire static HTML website with PHP

June 14, 2010

I am in a situation where I need analytics data and none is provided. The entire 35k+ file website is all static HTML running on a Windows IIS server. I am not familiar enough with Windows Server to know what sort of scripting capabilities there are, but I do have PHP available. I wrote a

Javascript: Forward user to new page

June 6, 2010

I often find myself needing to forward a user through Javascript for various reasons. Here are a couple quick snippets of Javascript to accomplish that task. This one is supposed to block the Back button from tracking the change window.location.replace(“http://example.com”); window.location = “http://www.example.com”;

New Website Launch: Leon Powers

June 4, 2010

Leon Powers commissioned me to build a website for his publishing entity Look-About-Books and his Boy Scout pseudonym Doc Hawk. It came together pretty well. Take a look and order his new book while you are there. Visit Leon Powers Website