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-Drill-Down-Using-jQuery-AJAX.aspx

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

Reply via email to