Run a callback function on each node in a Dabby collection, and return an array.
$(selector).map(callback);The callback uses the following pattern:
function (index, element) {
// your code here, this is the same as element
}The following example extracts the innerText from the HTML as an array:
<div class="map">First</div>
<div class="map">Second</div>
<div class="map">Third</div>var arr = $(".map").map(function () {
return this.innerText;
});An array containing the values returned from the callback.
Dabby does not support making a collection from anything but nodes, whereas in jQuery this method returns a jQuery collection wrapping the return values, Dabby returns a plain array.