blog about graphic design, web design and marketing

The D. Drew Design Blog

Articles pertaining to "code"

25
jun 11

jQuery is-or-is-child-of function

Sometimes, in Javascript, when you interact with an element, you want to know if that element is or is the child of a specific element. A case of this might be a context menu that you have pop-up when you click on elements on the page, but you want it to be smart enough not to re-propogate when you click on the context menu itself.  see the article


9
feb 10

Snazzy jQuery Form Alert Boxes

For a recent client, I wanted to write a script that would alert a user to not leave a field blank. Using jQuery, I wrote a script that animates a small alert box into a position relative to the input box in question. If the user "focuses" on the particular input box, then "blurs" (clicks off of it, or clicks elsewhere) without inputting anything, the alert box will insert itself into the DOM directly above the particular <input> in question alert them that they left it empty. see the article


11
jul 09

Creating An Image Management System for Your Website with Smart Image Resizer and Lightbox 2

When I was developing this site, I decided early on that I wanted to use Lightbox 2 as my primary image viewing module. It's attractive and suits the clean look on my site. However, as I started adding more CMS features to my site through PHP, I realized I would need software that would automatically resize images as well.  see the article


27
jun 09

PHP Popular Tags List

A popular tags list can help your users find articles relating to certain topics without having to guess what a good search input might be. This is the code I created for my own site, which now contains one such list. see the article


15
jun 09

How to Talk Like PHP: Part 2

One of the things that tripped me up a lot early on were predefined variables. These variables look like $_POST, $_GET, $_SERVER, $_FILES, ETC., er, I mean "etc." lowercase. They're like the establishment. see the article