From 1a2d0098284ace0c82b56d7a6b1d8cd940d0ee5a Mon Sep 17 00:00:00 2001 From: Ellipsis Date: Mon, 21 Apr 2014 20:07:29 +0100 Subject: [PATCH] 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. --- page/using-jquery-core/manipulating-elements.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/page/using-jquery-core/manipulating-elements.md b/page/using-jquery-core/manipulating-elements.md index 7ac25fd6..74a0c4c0 100644 --- a/page/using-jquery-core/manipulating-elements.md +++ b/page/using-jquery-core/manipulating-elements.md @@ -93,7 +93,7 @@ $( "", { }); ``` -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). +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). 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. @@ -144,14 +144,14 @@ $( "#myDiv a:first" ).attr( "href", "newDestination.html" ); // Manipulating multiple attributes. $( "#myDiv a:first" ).attr({ href: "newDestination.html", - rel: "super-special" + rel: "nofollow" }); ``` ``` // Using a function to determine an attribute's new value. $( "#myDiv a:first" ).attr({ - rel: "super-special", + rel: "nofollow", href: function( idx, href ) { return "/new/" + href; }