after() will insert elements 'after' the selected elements in the DOM.
If the element is not in the DOM, that is kind of 'outer space', there
is no 'after' it. Append and prepend should work just fine:

$('<p>foo</p><p>bar</p>')
   .append('<b>.test</b>')
   .prepend('<span>test: </span>')
   .appendTo('body');

http://jquery.nodnod.net/cases/75

cheers,
- ricardo

On Feb 26, 8:33 am, stephen <stephen.cant...@gmail.com> wrote:
> Hello,
>
> has anybody managed to prepend and append elements to a set of dom
> elements previously created on the fly with the "$(html)" function?
>
> I've tried with append, prepend, after, before, etc without any
> luck...
>
> Is there a way to do it?
>
> Stephen

Reply via email to