may want to try the correct syntax for "each"

$.each($items, function() {
     totalit(this);
});

also, just to point out, usually "best practice" points out to use "$"
at the beginning of variable names for jQuery objects.... surely works
otherwise, but your style is slightly confusing


On Nov 26, 4:32 am, Neena <ever...@gmail.com> wrote:
> Hello,
>
> I have below code that run the function when document is ready. It
> works fine in Firefox but not IE. What did I do wrong? Looks like the
> code doesn't get run at all. I tried jQuery(function() ... but it
> didn't work too
>
> $(document).ready(
>         function() {
>                 var $items = ['regular', 'outsource', 'total_headcount', 
> 'internal',
> 'external', 'resigned', 'eligible', 'member', 'valoptec_percent'];
>
>                 $($items).each(function() {
>                         totalIt(this);
>                 });
>         }
> );
>
> Thanks!

Reply via email to