|
Tuesday, 21 March 2006 |
|
coolforms 1.0
I wrote a small little javascript library that I use on several of my sites to spice up standard old html forms. I call it CoolForms for lack of any originality.
Basically it traverses the DOM and adds configurable classnames to HTML Form elements. It also adds event handlers (mouseover, mouseout, focus, blur) to the element and changes classes on each state. Then, you can modify a simple style sheet and, voila, you have cool looking form elements. The script uses Mike Foster's excellent X Library. If you already have prototype.js on your site, you could easily change out a couple lines of code and skinny down your bandwidth for the X library.
If you want to use it, you should include the script and call the "coolForms()" function when the window is loaded. Also, be sure to include the css file in your page.
Then, just edit the css file to add the effects you want.
Powered by AkoComment 2.0! and SecurityImage 3.0.2 |
fabrizim said...