Skip to content

Commit

Permalink
Merge branch 'master' of github.com:MatthewMueller/cheerio
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmueller committed Nov 18, 2012
2 parents 2b7500d + 7d3ef38 commit 8fc7716
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,10 @@ Gets an html content string from the first selected element. If `htmlString` is

```js
$('.orange').html()
//=> <li class = "orange">Orange</li>
//=> Orange

$('#fruits').html('<li class = "mango">Mango</li>').html()
//=> <ul id="fruits">
// <li class="mango">Mango</li>
// </ul>
//=> <li class="mango">Mango</li>
```

#### .text( [textString] )
Expand Down Expand Up @@ -454,10 +452,10 @@ $.html()
// </ul>
```

If you want to render just a piece of the document you can use selectors:
If you want to return the outerHTML you can use `$.html(selector)`:

```js
$('.pear').html()
$.html('.pear')
//=> <li class = "pear">Pear</li>
```

Expand Down

0 comments on commit 8fc7716

Please sign in to comment.