File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 <p >Given an unordered list with five <code >< li> </code > elements, this example adds the class "item-4" to the last <code >< li> </code >.</p >
2929 </longdesc >
3030 <example >
31- <desc >Adds the class "selected" to the matched elements.</desc >
31+ <desc >Add the class "selected" to the matched elements.</desc >
3232 <code ><![CDATA[
33- $("p:last" ).addClass("selected");
33+ $("p").last( ).addClass("selected");
3434 ]]> </code >
3535 <css ><![CDATA[
3636 p { margin: 8px; font-size:16px; }
4444 ]]> </html >
4545 </example >
4646 <example >
47- <desc >Adds the classes "selected" and "highlight" to the matched elements.</desc >
47+ <desc >Add the classes "selected" and "highlight" to the matched elements.</desc >
4848 <code ><![CDATA[
4949 $("p:last").addClass("selected highlight");
5050 ]]> </code >
6767 addedClass = "green";
6868 $("p").text("There is one green div");
6969 }
70-
70+
7171 return addedClass;
7272 });
7373]]> </code >
8989 <category slug =" css" />
9090 <category slug =" version/1.0" />
9191 <category slug =" version/1.4" />
92- </entry >
92+ </entry >
You can’t perform that action at this time.
0 commit comments