NOTE: Sadly I am no longer updating this blog. You can go to my homepage instead.
Aug 28 2009

CSS | JavaScript | JQuery | Tutorial

How to add a webpage fade-in effect using JQuery

THE PROBLEM: HTML pages that have numerous and complex nested <div> tags and CSS can sometimes have a jumbled “assembling” appearance that happens as the page is loading and the various elements are being rendered by the browser. The appearance of this process can look quite unrefined and detract from professional appearance of the site. [...]

Read the rest of this entry...
Apr 21 2009

JavaScript | Tips

Object-Oriented JavaScript Tip: Implementing the Singleton Pattern

The Singleton design pattern is a development approach that ensures only a single instance of a particular class is available in a system. Imagine building the game of chess, you would only want there to be one instance of the board floating around—say an instance of a class called ChessBoard. The Singleton pattern ensures that [...]

Read the rest of this entry...
Apr 09 2009

JavaScript | Tips

Object-Oriented JavaScript Tip: Creating static methods, instance methods

Custom JavaScript objects can have instance methods (function that are associated with a particular JavaScript object), but like other Object-Oriented languages, they can also have static methods, that is functions that are associated with the JavaScript class that created an object, as opposed to the object itself. This is useful in cases where a function [...]

Read the rest of this entry...
Apr 05 2009

JavaScript | Tips

Object-Oriented JavaScript Tip: Overriding toString() for readable object imprints

JavaScript has a core Object class that contains a toString() method that is called whenever a request is made to convert an object to a string (like related ECMAScript-based ActionScript). This is often done during debugging to check that a variable actually contains a reference to a certain object. Most likely alert(myObj) or console.log(myObj) would [...]

Read the rest of this entry...