Traversing the DOM Tree with jQuery

Although jQuery can be extremely simple to use once you get the hang of it, there are so many functions and methods that it can be overwhelming and confusing at times.

One issue I had over the last week or so was figuring out how to simply traverse the DOM tree. Using jQuery selectors, it’s a breeze to do so; but what do you do when you’re working on a specific jQuery object and you want to go up or down the DOM tree?

Find Files By Modification Date

Quite often, I find myself in a situation where I need to figure out which files on my Web server were modified recently. For instance, when I make updates to the development version of my Web site and decide I’m ready to copy those changes over to the production site, I need to find out for sure which files I modified.

This is actually a very simple process when using a *nix-based Web server, assuming you have secure shell (SSH) access. Obviously, these instructions apply to any *nix-based operating system (I’m assuming they also work on Mac, but have not tested), not just Web servers.

To do so, we’ll use the “find” shell command. Find is a pretty powerful and universal search command for Linux/Unix.

Retrieve a Portion of HTML with jQuery

jQuery offers some really powerful functions and methods to utilize AJAX. One that I’ve discovered recently is the .find() method. The .find() method allows you to search for a specific HTML ID within some HTML and then returns only the content found within that ID.

Find an Item in an Array (PHP)

On occasion, I’m sure you’ve found yourself in a position where you need to find an item inside of an array. PHP offers a very simple method to do just that. The array_search function lets you search for the item and then tells you what the index for that item is. This function works with numerically indexed arrays and with associative arrays.