Dhruvar:

   Thanks. I did so, and it made no difference.
I have often used variables, but not arrays, without the $.
I think the use of $ before such variables is merely a convention.

Harvey

On Dec 2, 11:43 am, Dhruva Sagar <dhruva.sa...@gmail.com> wrote:
> Clearly boxes[i] is not a jQuery object.
> you should try $(boxes[i]).css perhaps
>
> Thanks & Regards,
> Dhruva Sagar.
>
> On Thu, Dec 3, 2009 at 1:04 AM, hsfrey <hsf...@gmail.com> wrote:
> > I'm using the following code:
>
> >                var boxes = $('.resizable').get();     // get divs as array
> >                for (var i=0; i<boxes.length; i++ )
> >                { console.log(boxes[i].id+': left='+boxes[i].css('left'));
> >    }
>
> > I get this error message from Firebug:
> >               boxes[i].css is not a function
> >              [Break on this error]
> >             { safelog($boxes[i].id+': left='+$boxes[i].css('left'));\r
> > \n
>
> > I have used similar code before, but for an individual item, not an
> > array.
> > For instance, This works fine:
>
> >              var sel1=$('#'+b1);
> >              var c1x = parseInt(sel1.css('left'));
>
> > Does this simply not work on arrays, or have I made some other error?

Reply via email to