Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mueller committed Aug 10, 2012
1 parent 0abab89 commit 522a26e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Iterates over a cheerio object, executing a function for each matched element. W
#### .map( function(index, element) )
Iterates over a cheerio object, executing a function for each selected element. Map will return an `array` of return values from each of the functions it iterated over. The function is fired in the context of the DOM element, so `this` refers to the current element, which is equivalent to the function parameter `element`.

var classes = $('li').map(function(i, el) {
$('li').map(function(i, el) {
// this === el
return $(this).attr('class');
}).join(', ');
Expand Down

0 comments on commit 522a26e

Please sign in to comment.