Computer Science Canada Jquery, getting more than one id in a function |
Author: | nonamedude [ Mon May 16, 2011 10:13 am ] | ||||||
Post subject: | 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
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
This is what the value that works (the first call)
|
Author: | Zren [ Mon May 16, 2011 11:08 am ] |
Post subject: | RE:Jquery, getting more than one id in a function |
Look at the difference between these two very carefully. .attr('id2') <a id = $storyID And remember the markup is as follows: <tag attribute=value attribute=value> The .attr() function returns the value of the attribute entered as a parameter. |
Author: | nonamedude [ Thu May 19, 2011 5:14 pm ] |
Post subject: | Re: Jquery, getting more than one id in a function |
Oh thanks, i see my mistake |