danmillar/jquery-anystretch — pull request #6 by miketierney (2013-04-08 19:22:06+00:00)
Title: Add support for iterating across groups of jQuery objects

The current implementation only allows the following use cases:

```javascript
$('#my_node').anystretch('path/to/image');
```

and

```javascript
$.anystretch('path/to/image');
```

I have a scenario where I'd like to have this work like a proper module, grabbing a collection of nodes and then applying the anystretch function to them:

```html

```

Which I could enable by doing something like this:

```javascript
$('.js-stretch-image').anystretch($(this).data('imgSrc')); // ideal
```

or

```javascript
$('.js-stretch-image').each(function(i, el){ // less than ideal, but more flexible
$(el).anystretch($(el).data('imgSrc'));
});
```

The problem lies with the use of `this.selector` as the toggle for whether or not the `isBody` Boolean is `true` or not. My patch changes it to check for whether or not `this.context` is undefined (`true` when executed from `$.anystretch()` and `false` when `$('.selector').anystretch()`).