css not applying to xml elements
hi,
I'm trying to import some xml code and append it to some dom element, using this...
[code]
$.ajax({
type: "GET",
url: "resources/xml/sites.xml",
dataType: "xml",
success: function(xml){
$('body').append($(xml).find('text').clone().contents())
alert($('#lol').length)
},
})
[/code]
sites.xml is:
[code]
<?xml version="1.0" encoding="iso-8859-1"?>
<sites>
<text><a id="lol" class="menu_a" href="www.google.it">ahuahauhauahu</a></text>
</sites>
[/code]
the correct code ( <a id....></a> ) is appended in body (checked with firefox and chrome js console), but the css style associated to it is not applied at all... it's not even shown as a link...
moreover, the alert method returns 0, so I cannot even search by its id or class...
I used the .clone() method because chrome shows an error without it.
Any suggestions?
thanks :)