Why does jQuery .after() not chain the new element?
问题 I am curious why jQuery's .after() does not chain, or "provide you with," the new element that you create with it. It seems to me like it should, but I am no expert and was hoping someone could shed some light on why it's a bad idea. Here's an example to see what I would like from .after(): Here is some markup: <div id="content1"> <p id="hello1">Hello</p> </div> <div id="content2"> <p id="hello2">Hello</p> </div> Here's what I want, but this replaces "Hello" with "World!": $('#hello1').after(