5 minute code: JQuery Tabbed Interface

The JQuery UI library is awesome for doing super cool stuff super quick. For example, a tabbed interface! Who wants to reload after you click on a tab? No one. Who wants to take ages to code it? No one. Therefore, welcome to TGC’s 5 minutes of code! 1. Make the tab links.  Make sure...
Read More

AngularJS – Getting Started & Binding

Is it just me or does it seem like every time you turn around there’s a new Javascript framework popping up.  Backbone, Node, Ember; they all seem to have really strong fan bases, but the one that’s really peeked my interest lately is Angular.  Created by our friends at Google, the open-source framework integrates almost...
Read More

Prototyping and Inheritance in Javascript

A prototype in Javascript is exactly what it sounds like: a prototype for object to follow.  The best way to explain it would be with an example, of course! We’ll throw in some inheritance while we’re at it. Let’s say we have an an Animal object, that has a name and numLegs, which is a...
Read More

Classes in Javascript

For all of those who usually code in OO languages, there’s actually a pretty similar approach in JS. A “class” in JS will have the properties / attributes of the object, along with any methods that might relate to that object. It’s like a template that can be used to create many objects with similar...
Read More

Objects in Javascript

Declaring an object in Javascript can be done in various ways. Object Literal Notation This creates a single object. Initiating an object with literal notation goes like this: var anne = { name: "Anne", age: 32 // adding functions speak: function () { // code; }; }; where the properties are given as a hash...
Read More