Skip to content

Commit e873a7d

Browse files
committed
Fix insertion examples.
Closes jquery#253
1 parent 3f88c40 commit e873a7d

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

entries/appendTo.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@
5050
<p>If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first, and that new set (the original element plus clones) is returned.</p>
5151
</longdesc>
5252
<example>
53-
<desc>Appends all spans to the element with the ID "foo"</desc>
54-
<code><![CDATA[$("span").appendTo("#foo"); // check append() examples]]></code>
53+
<desc>Append all spans to the element with the ID "foo" (Check append() documentation for more examples)</desc>
54+
<code><![CDATA[
55+
$("span").appendTo("#foo");
56+
]]></code>
5557
<css><![CDATA[#foo { background:yellow; }]]></css>
5658
<html><![CDATA[<span>I have nothing more to say... </span>
5759

entries/insertAfter.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@
4141
<p>If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first, and that new set (the original element plus clones) is returned.</p>
4242
</longdesc>
4343
<example>
44-
<desc>Inserts all paragraphs after an element with id of "foo". Same as $("#foo").after("p")</desc>
45-
<code><![CDATA[$("p").insertAfter("#foo"); // check after() examples]]></code>
44+
<desc>Insert all paragraphs after an element with id of "foo". Same as $("#foo").after("p")</desc>
45+
<code><![CDATA[
46+
$("p").insertAfter("#foo");
47+
]]></code>
4648
<css><![CDATA[#foo { background:yellow; }]]></css>
4749
<html><![CDATA[<p> is what I said... </p><div id="foo">FOO!</div>]]></html>
4850
</example>

entries/insertBefore.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@
4141
<p>If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first, and that new set (the original element plus clones) is returned.</p>
4242
</longdesc>
4343
<example>
44-
<desc>Inserts all paragraphs before an element with id of "foo". Same as $("#foo").before("p")</desc>
45-
<code><![CDATA[$("p").insertBefore("#foo"); // check before() examples]]></code>
44+
<desc>Insert all paragraphs before an element with id of "foo". Same as $("#foo").before("p")</desc>
45+
<code><![CDATA[
46+
$("p").insertBefore("#foo");
47+
]]></code>
4648
<css><![CDATA[#foo { background:yellow; }]]></css>
4749
<html><![CDATA[<div id="foo">FOO!</div><p>I would like to say: </p>]]></html>
4850
</example>

entries/prependTo.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@
4545
<p>If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first.</p>
4646
</longdesc>
4747
<example>
48-
<desc>Prepends all spans to the element with the ID "foo"</desc>
48+
<desc>Prepend all spans to the element with the ID "foo" (Check .prepend() documentation for more examples)</desc>
4949
<css><![CDATA[div { background:yellow; }]]></css>
5050
<code><![CDATA[
51-
// Check prepend() for more examples
5251
$("span").prependTo("#foo");
5352
]]></code>
5453
<html><![CDATA[<div id="foo">FOO!</div>

0 commit comments

Comments
 (0)