
-----------------------------------
nonamedude
Mon May 16, 2011 10:13 am

Jquery, getting more than one id in a function
-----------------------------------
Hey guys, I seemed to have run into a roadblock. 

When I am in a function, is it possible to get more that one id. Here is the code I have right now

[code]$('a.commentUp').bind('click',function()
                {
                    var myid = $(this).attr('id');     //first call
 var myid2 = $('a.common').attr('id2');	//second call	
}[/code]

When I do the second call I get an undefined value if I print it out. The first value is fine.

This is what I am trying to get the value of

[code] [/code]

This is what the value that works (the first call)

[code] [/code]

-----------------------------------
Zren
Mon May 16, 2011 11:08 am

RE:Jquery, getting more than one id in a function
-----------------------------------
Look at the difference between these two very carefully.
.attr('id2')
