Nothing ground breaking, but it is amazing how annoying complicated and messy it is to refer to an element using
document.getElementById("element");
This usually always means that you have to assign it to another variable to make it convenient enough to deal with. Most frameworks use the $ function, that is - you can do the exact same as above, by using
$('element');
Suppose you don't need an entire framework, but want to retain this convenient function - it's incredibly easy to replicate for your own JS repository.
function $(element)
{
return document.getElementById(element);
}
Just a small little tip for those of you who may not be aware of this great idea first introduced by the prototype library, if you code javascript much at all, you'll learn to love this function!




