Skip to content

Commit 2e2807c

Browse files
Ellipsis753scottgonzalez
authored andcommitted
Manipulating Elements: Made text reflect code. Set "rel" to valid value.
In the code "html:" is used. However in the text underneath "text" is mentioned. This is now corrected to talk about "html" underneath instead. Also. Previously the tutorial sets a link's "rel" to "super-special". As "super-special" isn't a valid value for "rel" I have changed it to "nofollow" as this is a valid value (and fairly well known). This is really just a taste thing but I found "super-special" a little confusing here. Closes jquerygh-495
1 parent e6e4e8a commit 2e2807c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

page/using-jquery-core/manipulating-elements.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ $( "<a/>", {
9393
});
9494
```
9595

96-
Note that the attributes object in the second argument above, the property name class is quoted, although the property names `text` and `href` are not. Property names generally do not need to be quoted unless they are [reserved words](/javascript-101/reserved-words/) (as `class` is in this case).
96+
Note that the attributes object in the second argument above, the property name class is quoted, although the property names `html` and `href` are not. Property names generally do not need to be quoted unless they are [reserved words](/javascript-101/reserved-words/) (as `class` is in this case).
9797

9898
When you create a new element, it is not immediately added to the page. There are several ways to add an element to the page once it's been created.
9999

@@ -144,14 +144,14 @@ $( "#myDiv a:first" ).attr( "href", "newDestination.html" );
144144
// Manipulating multiple attributes.
145145
$( "#myDiv a:first" ).attr({
146146
href: "newDestination.html",
147-
rel: "super-special"
147+
rel: "nofollow"
148148
});
149149
```
150150

151151
```
152152
// Using a function to determine an attribute's new value.
153153
$( "#myDiv a:first" ).attr({
154-
rel: "super-special",
154+
rel: "nofollow",
155155
href: function( idx, href ) {
156156
return "/new/" + href;
157157
}

0 commit comments

Comments
 (0)