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 <frederik.r...@gmail.com> wrote:
> 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 <dist...@yahoo.com> wrote:
>
> > can anyone help me to get the href attribute to send off with the
> > function in this code please
>
> > $("Item", xmlData).each(function(){
> >                                 var title = $(this).find( "Text" ).text();
> >                                 var url = $(this).find( "Url" ).text();
> >                                 var desc = $(this).find( "Description" 
> > ).text();
> >                                 $( '#wiki_article_list' ).append( '<li><a 
> > class="wikiLinks"
> > href="'+url+'">'+title+'</a></li>' )
> >                                         .click(function( event ){
> >                                                 event.preventDefault();
>
> >                                                 // why don't I get the href 
> > attribute here ?
>
> >                                                 var url = 
> > $(this).attr('href');
>
> >                                                 getWikiArticle( url );
> >                                         });
> >                         });
>
> > anyone?

Reply via email to