If you used Andrew's example, then you added a jQuery object to the
canvasClasses array. Calling innerHTML on a jQuery object won't work.
Try canvasClasses[0].html('htmlhere')

On Nov 4, 3:35 pm, shaf <shaolinfin...@gmail.com> wrote:
> That doesnt work either.
>
> On Nov 4, 11:28 pm, Andrew Tan <afh...@gmail.com> wrote:
>
>
>
> > You have to supply the canvas object as a parameter to the push function to
> > add it to the array.
>
> > canvasClasses.push($(this));
>
> > On Thu, Nov 5, 2009 at 10:16 AM, shaf <shaolinfin...@gmail.com> wrote:
> > > Hi Guys,
>
> > > I have several .class DIVs I want to manipulate. I have retrieved them
> > > using the following code:
>
> > >        var canvasClasses = new Array();
> > >        $(".canvas").each(function() {
> > >                canvasClasses.push()
> > >        });
>
> > > I am now trying to insert some HTML into the DIVs but its not working:
>
> > > canvasClasses[0].innerHTML = "htmlhere";
>
> > > Any ideas on why its not working ?

Reply via email to