[jQuery] problems getting HREF attribute in click event
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?