http://prototypejs.org/api/function/delay
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var delayConstant = 1;
arr.each(function(value, index){
(function(val){
$("myInput").value = val;
}).delay(delayConstant * index, value);
});
--
http://positionabsolute.net
On Aug 14, 5:53 am, Benj <[email protected]> wrote:
> Hey,
>
> I want to create a new effect that changes a numerical value in a text
> input box from one value to another by cycling through each number
> inbetween the two values. i.e. if the original value is 199.99 and I
> want to update it to 259.99 (normally with ajax) I would like the
> input value to be changed as below:
> 199.99
> 209.99
> 219.99
> 229.99
> 239.99
> 249.99
> 259.99
> This should create a sped-up digital clock effect. I will play about
> with which numbers to include depending on the distance between the
> values.
>
> How do I harness the looping used for core effects to perform this
> operation? This will also provide me with the transitions and timing.
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---