tags:

views:

131

answers:

2
+7  A: 

Use prependTo() and go the other way instead of prepend():

$("<li>Addition li</li>").effect("highlight", {}, 1000).prependTo("#foo");

or you may want to prepend first:

$("<li>Addition li</li>").prependTo("#foo").effect("highlight", {}, 1000);
cletus
Just to clarify why this works, it is because the `prepend()` function continues the chain with the original selection, not the recently prepended item. By using `prependTo`, the chain continues with the prepended item as the selection.
Doug Neiner
A: 

Identify the prepended text with a class and style it in your css? This may or not be suitable depending on your requirements, but i'd say its the simplest approach.

Paul Creasey