how to create delay in progressbar

how to create delay in progressbar

hi all,

i have added a progressbar from jquery ui into my jsp page. but i want to simulate it using a loop and adding some values to it on every loop cycle.  but how is it possible in jquery.




i tried it using jquery timer, but when the loop starts, it goes to infinite loop.  is there a way to simulate a working progress bar with some delay.