[jQuery] Getting href attribute from parent element
I want to get the value from the href attribute from a parent element. My code is : $(this).parent().attr(href); , but this doesn't work. I don't understand it because for the same parent $(this).parent().html(); gives me the expected output. Any thoughts on this ? Thank you. David ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Getting href attribute from parent element
David - Can you provide an example where this occurs? It'll help me to debug the issue. --John On 8/26/06, David [EMAIL PROTECTED] wrote: I want to get the value from the href attribute from a parent element. My code is : $(this).parent().attr(href); , but this doesn't work. I don't understand it because for the same parent $(this).parent().html(); gives me the expected output. Any thoughts on this ? Thank you. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/