function count(limit,count_field,count_display)
{
$(count_display).effects().start({
'opacity':[0,5]});
var value = $(count_field).getValue().length;
if(value > limit){
$(count_display).setStyle('color', new Color('#FF000C'));}
$(count_display).setHTML(value + '/' + limit);
$(count_display).effects().start({
'opacity':[5,0]
});
}
Friday, 31 August 2007
Text Field Counter
A small text input counter i made using mootools framework, while not much by most people javascript, i was happy with what i've created. i find alot of pre-made stuff is overcomplicated personly. so i try and aim to make things as simple as possible
Thursday, 30 August 2007
Subscribe to:
Posts (Atom)