[jQuery] Re: problems getting HREF attribute in click event

2009-02-22 Thread hybris77
I O U 1 mate that seems to have solved two problems in one go, thought that maybe both might do that same in the end but your final solution is more correct, before I was getting multiple answers somehow, now I get what I want, nice one On 22 Feb, 22:45, Frederik Ring wrote: > Ok, so now I th

[jQuery] Re: problems getting HREF attribute in click event

2009-02-22 Thread Frederik Ring
Ok, so now I think I get what you want to do - I was running around wondering why you had the preventDefault() in there. In your case the click event isn't bound to the but to your #wiki_article_list since you are chaining it after the append(). If you would do it like: $( '#wiki_article_list'

[jQuery] Re: problems getting HREF attribute in click event

2009-02-22 Thread Frederik Ring
I don't know what else is contained in your #wiki_article_list, but since you appended the just right before this should work: $(this).children('li:last').children('a').attr('href')

[jQuery] Re: problems getting HREF attribute in click event

2009-02-22 Thread hybris77
thanks frederik, but how do I refer to it a descendant? in the event function I would expect to get the event object as being THIS, please illuminate me On 22 Feb, 21:40, Frederik Ring wrote: > Because this in your context refers to the #wiki_article_list > > Refer to the a as a descendant of

[jQuery] Re: problems getting HREF attribute in click event

2009-02-22 Thread Frederik Ring
Because this in your context refers to the #wiki_article_list Refer to the a as a descendant of $(this) instead On Feb 22, 9:34 pm, hybris77 wrote: > can anyone help me to get the href attribute to send off with the > function in this code please > > $("Item", xmlData).each(function(){ >