@Test public void after() { Document doc = Jsoup.parse("<p>One <b>two</b> three</p>"); Element newNode = new Element(Tag.valueOf("em"), ""); newNode.appendText("four"); doc.select("b").first().after(newNode); assertEquals("<p>One <b>two</b><em>four</em> three</p>", doc.body().html()); doc.select("b").first().after("<i>five</i>"); assertEquals("<p>One <b>two</b><i>five</i><em>four</em> three</p>", doc.body().html()); }
public Node after(String html) { addSiblingHtml(siblingIndex + 1, html); return this; }
Node implements Cloneable { public Node after(String html) { addSiblingHtml(siblingIndex + 1, html); return this; } }
Node implements Cloneable { public Node after(String html) { addSiblingHtml(siblingIndex + 1, html); return this; } protected  Node(String baseUri, Attributes attributes); protected  Node(String baseUri); protected  Node(); }
Node implements Cloneable { public Node after(String html) { addSiblingHtml(siblingIndex + 1, html); return this; } protected  Node(String baseUri, Attributes attributes); protected  Node(String baseUri); protected  Node(); abstract String nodeName(); String attr(String attributeKey); Attributes attributes(); Node attr(String attributeKey, String attributeValue); boolean hasAttr(String attributeKey); Node removeAttr(String attributeKey); String baseUri(); void setBaseUri(final String baseUri); String absUrl(String attributeKey); Node childNode(int index); List<Node> childNodes(); List<Node> childNodesCopy(); final int childNodeSize(); Node parent(); final Node parentNode(); Document ownerDocument(); void remove(); Node before(String html); Node before(Node node); Node after(String html); Node after(Node node); Node wrap(String html); Node unwrap(); void replaceWith(Node in); List<Node> siblingNodes(); Node nextSibling(); Node previousSibling(); int siblingIndex(); Node traverse(NodeVisitor nodeVisitor); String outerHtml(); Appendable html(Appendable appendable); String toString(); @Override boolean equals(Object o); boolean hasSameValue(Object o); @Override Object clone(); }
Node implements Cloneable { public Node after(String html) { addSiblingHtml(siblingIndex + 1, html); return this; } protected  Node(String baseUri, Attributes attributes); protected  Node(String baseUri); protected  Node(); abstract String nodeName(); String attr(String attributeKey); Attributes attributes(); Node attr(String attributeKey, String attributeValue); boolean hasAttr(String attributeKey); Node removeAttr(String attributeKey); String baseUri(); void setBaseUri(final String baseUri); String absUrl(String attributeKey); Node childNode(int index); List<Node> childNodes(); List<Node> childNodesCopy(); final int childNodeSize(); Node parent(); final Node parentNode(); Document ownerDocument(); void remove(); Node before(String html); Node before(Node node); Node after(String html); Node after(Node node); Node wrap(String html); Node unwrap(); void replaceWith(Node in); List<Node> siblingNodes(); Node nextSibling(); Node previousSibling(); int siblingIndex(); Node traverse(NodeVisitor nodeVisitor); String outerHtml(); Appendable html(Appendable appendable); String toString(); @Override boolean equals(Object o); boolean hasSameValue(Object o); @Override Object clone();  }