This should do it:

function makePB(id, newVal) {
  $("#" + id).progressbar({ value: newVal });
}

- Richard

On Thu, Apr 16, 2009 at 1:06 PM, contact.chza...@googlemail.com <
contact.chza...@googlemail.com> wrote:

>
> Hi I am using the progress bar functionality but I will have a lot of
> progress bars on a page. What I am doing right now is hardcodding all
> the div ID's which is fine if I have only two or three progress
> bars...
>
> I will have around 30 or so on one page and I need a function that I
> can call and I pass it with the id of the div and the value for that
> bar.
>
> Any help if there is something like this?
>
> Regards,
>
> Zahid
>
> <script type="text/javascript">
>        $(function(){
>        // Progressbar 1
>        $("#progressbar1").progressbar({
>        value: 89
>        });
>        // Progressbar 2
>        $("#progressbar2").progressbar({
>        value: 40
>        });
>        // Progressbar 3
>        $("#progressbar3").progressbar({
>        value: 60
>        });
>        // Progressbar 4
>        $("#progressbar4").progressbar({
>        value: 80
>        });
>        // Progressbar 5
>        $("#progressbar5").progressbar({
>        value: 10
>        });
>        // Progressbar 6
>        $("#progressbar6").progressbar({
>        value: 25
>        });
>        });
> </script>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to