My bad. Been a long day. :) On 7/3/07, Ganeshji Marwaha <[EMAIL PROTECTED]> wrote:
Glen, As per jQuery docs, attr() method retrieves the attribute of the first matched element. Hope that clears the confusion. http://docs.jquery.com/DOM/Attributes -GTG. On 7/3/07, Glen Lipka <[EMAIL PROTECTED]> wrote: > > The two lines are confusing me a little. > > Setting a variable our of a jQuery object: > var jElement = $("SOME CSS"); > > This finds all of the nodes that match the "SOME CSS" selector and puts > them in a jQuery object called jElement. > It could be 1 element or many depending on how many it finds that match. > > alert(jElement.attr("id")); would pop up [object object] if it was more > than one in the array. > > Glen > > > On 7/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > Example: > > > > var jElement = $("#"+element).attr("id"); > > > > alert(jElement.attr('id')); > > > > > > This doesn't appear to work like this. Anyone know of the right way, > > or if there is a way to do this? > > > > Also, has anyone considered setting up a discussion forum for jQuery? > > I'm considering it... > > > > >

