Snif
12-30-2006, 06:36 PM
Did you know that javascript can be manipulated and turned into an object based language? Well you do now. To do this I use the prototype (http://prototype.conio.net/) javascript library. To just use the Object based part you do not need the entire library. I made a file called prototype.lite.js which was based on the moo.fx prototype.lite.js. The modifications I made was the adding of a few more functions from protype and added 3 shortcut functions of my own design. These shortcuts are :
// Sets innerHTML
$I = function(elem, inner){ $(elem).innerHTML=inner; }
// Appends innerHTML
$IA = function(elem, inner){ $(elem).innerHTML+=inner; }
// Returns style
$S = function(elem){ return $(elem).style; }
My customized version of prototype.lite.js can be viewed here (http://kniffenwebdesign.com/prototype.lite.js).
I will be posting some of my own javascript classes soon. :)
// Sets innerHTML
$I = function(elem, inner){ $(elem).innerHTML=inner; }
// Appends innerHTML
$IA = function(elem, inner){ $(elem).innerHTML+=inner; }
// Returns style
$S = function(elem){ return $(elem).style; }
My customized version of prototype.lite.js can be viewed here (http://kniffenwebdesign.com/prototype.lite.js).
I will be posting some of my own javascript classes soon. :)
