implementation og JQuery progress bar

implementation og JQuery progress bar


I try to use JQ progress bar for preloading img's. The Site should
only use JAVA script and no serverside code.
As special hint: I'm a very beginner using JQ...
I've developed one function for loading file given by a paramter. In
this function I call a second function updateing the progressbar like:
    function load_status_set(status_percentage) {
        // Progressbar
        $("#progressbar").progressbar({
        value: status_percentage
        });
    }
I try to call the loading function in HTML header or body. In both
cases the result is one static setting of the progress bar. In header
I get 100% and no steps between, in body I get only the first
percentage by loading first file (for example 25% in case of loading 4
files).
I think it's a problem of actualisation the DOM-Object of progressbar,
more then one time by loading the file.
You see I need some hints how the page loading process works generally
or in special case of JQ progress bar.
Perhapse, it's simply impossible developing progress bar in one HTML
file using only JQ on client side?
Thanks for any hint...