clear content before parsing
Hi everyone,
I have a function that parses xml data to a <ul>. What I need to know is how to clear the <ul> before parsing a second time to refresh the list.
my current script looks like this:
$(document).ready(function() {
$.ajax({
type: "GET",
url: "myData.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('trick').each(function(){
var title = $(this).attr('title')
var description = $(this).find('description').text()
$('<li></li>').html(title + ' (' + description + ')').appendTo('#help_download ul');
$('.loadingPic').fadeOut(1400);
});
}
});
});
I would appreciate any help. thanks in advanced