Basic Javascript Closure

Here is an example of a basic use of Javascript closure. A benefit of using a closure is it will not get cleaned up by garbage collection and cab be reused. function whoAmI(param){ // create the outer function and pass in the name var name = param; // name is equal to the param you […]

Expanding a HTML5 search input like Apple.com

Apple recently converted their site to html 5 and introduced a new navigation. The search which has always mirrored aspects of OSX and now acts like the IOS safari search. Once the input is focused the width is animated. Here is a demo I made with jQuery mirroring what they are doing. Here is the […]

Pseudo CSS first-child, last-child

In CSS 2.1 the “first-child” and CSS 3 adds “last-child” pseudo-class implementation. These allow for specific stlyes to be added to beginning and ending elements. This can be extremely helpful for navigation and other common list types. The one draw back of using these pseudo-classes is ie6 will not support them. Here is a short […]