Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jamietre committed Mar 4, 2013
1 parent d42146d commit d0b7a86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ Here's a basic example of parsing HTML, selecting something, altering it, and re

bold.Remove(); /// jQuery Remove method

string html = dom.Render(); /// =="<div>Hello world! What about </div>
string html = dom.Render(); /// =="<div>Hello world! What about </div>"

There are other ways to create `CQ` objects, run selectors, and change the DOM. You can also use the property indexer
to like an array indexer, e.g. `dom[0]` returns the first element in your selection. If there is one, that is!
like an array indexer, e.g. `dom[0]` returns the first element in your selection. If there is one, that is!
Using the LINQ method `dom.FirstOrDefault()` might be a better choice for many situations. In javascript, you'd often test the
`Length` property of a selection to see if there were any results. The `CQ` object exposes an `IEnumerable<IDomObject>` interface,
so you can use LINQ to simplify many operations. But you still have all the tools that you're used to from jQuery, too.
Expand Down

0 comments on commit d0b7a86

Please sign in to comment.