On Apr 24, 9:43 pm, dgb <dgbur...@gmail.com> wrote:
> Hi,
>
> I've got a reference to a TableCell and I'd like to use jQuery to get
> the first instance of an <IMG> tag within that TableCell, but can't
> get the syntax right, I understand how it would work if I were to
> reference the TableCell by and ID or class, but not when I have a
> direct reference to the cell, I've got:
>
> var tdRef = xxx;
>
> $(tdRef).html();
>
> ... could somebody let me know what the jQuery syntax should be to get
> the first img tag within "tdRef"?

It is likely faster to use:

  var firstImage = tdRef.getElementsByTagName('img')[0];


--
Rob

Reply via email to