Perfect - thanks!

BK


On Nov 22, 4:00 am, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
> As the $(master).children()[0] is a Javascript object, rather than a
> jQuery object, the src is referring to the attribute 'src', so in this
> case, it's the file path of the image
>
> Rik
>
> 2008/11/22 BKahuna <[EMAIL PROTECTED]>:
>
>
>
>
>
> > I'm working my way through understanding the Master/Detail, AJAX
> > enabled, accordion style control presented here:
>
> >http://mosesofegypt.net/post/2008/04/GridView-Grouping-Master-Detail-...
>
> > The following code has me confused (I've only included a couple lines
> > of the function):
>
> > function showhide(master,detail,customerId)
> > {
> >    //First child of master div is the image
> >    var src = $(master).children()[0].src;
>
> > master is a div passed into the function that contains an <img> and a
> > <span> element.  This line:
>
> >    var src = $(master).children()[0].src;
>
> > returns a jQuery to the img element.  I'm trying to figure out how.  I
> > understand that $(master).children() will return a jQuery object
> > containing the children of the master div (the <img> and <span>).  I
> > can even understand that the [0] probably refers to the first element
> > in the jQuery object.  I don't get the final ".src".  What's that all
> > about?
>
> > Thanks very much,
>
> > BK
>
> --
> Rik Lomashttp://rikrikrik.com

Reply via email to