[jQuery] Re: How to manipulate an object containaing HTML

2009-10-02 Thread Julien
On 1 oct, 20:07, Karl Swedberg k...@englishrules.com wrote: Sure, you can do this with html. Inside the success callback function, do this: $(html)    .find(td)      .css('padding-left','80px')    .end()     .appendTo('#myTable'); great! that's the .end() part i was missing! Thanks, i

[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Cyril Lopez
2009/10/1 Julien tux...@gmail.com Hello, i'm trying to find out how to edit (manipulate DOM) of an HTML ajax result. returns rows of a table : tr td/td td/td /tr tr td/td td/td /tr What i would like to do is before appending to the table something like that :

[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Charlie
you are trying to apply css to something that isn;t in the DOM. $.css() uses inline style attribute so if there is no html inline the attribute can't be applied can you add class name to html server side and use css to pad? if not you could add class to exisitng td's before insertion of new

[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Julien
On 1 oct, 16:26, Charlie charlie...@gmail.com wrote: you are trying to apply css to something that isn;t in  the DOM.  $.css() uses inline style attribute so if there is no html inline the attribute can't be applied can you add class name to html server side and use css to pad? if not you

[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Charlie
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 Julien wrote: On 1 oct, 16:26, Charlie

[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Julien
On 1 oct, 17:52, Charlie charlie...@gmail.com 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

[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Karl Swedberg
Sure, you can do this with html. Inside the success callback function, do this: $(html) .find(td) .css('padding-left','80px') .end() .appendTo('#myTable'); I agree with Charlie that it's a better idea to set the style with css and then just add a class to the td elements. Whether