Can you show more code around the ".html" statement? this will help others better help you understand what "this" is in that context
On Jun 14, 10:02 am, Logictrap <dlyck...@gmail.com> wrote: > I need to get the src attribute of an img element that is a sub- > element of 'this' but I can't figure out how to traverse 'this' to get > there. > > The contents of 'this' are: > > <div id="test1"><img src="images/beach1.jpg" width="200" > height="200" alt="beach" /></div> > > this works: > > $('#output').html("ID: " + this.id); > > This does not: > > $('#output').html("SRC: " + this.img.src); > > How do I get the contents of the img.src attribute'?