On 1 oct, 17:52, Charlie <[email protected]> wrote:
> if it was json or xml could parse it then append, I've never tried parsing
> html from ajax
> anotherĀ method is appendĀ to an empty hidden table, add classes/css or
> whatever to the td's in that table then append them to your visible table
hum... i'm still thinking there must be much more to it. See the
following example :
$('a').live('click',function(e){
$.ajax({
url: "testAjax.html",
cache: false,
success: function(data){
htmlOutput = $('.fileName',data).css('padding-left','80px');
htmlOutput.appendTo("#treeTable");
}
});
e.preventDefault();
})
By specifying as DOM context the returned html, i'm able to work on
it.
The only thing in this example i don't get is why htmlOutput return
only the td updated and not the surrounding tr.
Is it the way it work only? If it is, i could try parsing it as xml as
you said with the each function but i want to be sure i'm not missing
something! :)
Thanks for the help!