filamentgroup/jQuery-Equal-Heights — pull request #12 by JangoSteve (2013-05-15 03:47:38+00:00)
Title: Options hash

I had a need to use `equalHeights` on some rows where the target elements that needed their heights set were not the direct children of the actual row element. So, I made an options hash. This plugin currently had one option for `px`, so I moved that into the options hash and made it default to `false` if nothing is passed in, just as before.

So the default options are:

```js
{px: false, filter: 'children', selector: '*'}
```

...which leaves the default behavior identical to what it is currently. Instead of hardcoding `$(this).children()`, it now would be `$(this)['children']('*')`, which is the same as before, just written differently so as to make the actual values easy to customize. For example, I'm currently using the plugin like this:

```js
$('.row').equalHeights({filter: 'find', selector: '.profile'})
```

This allows me to actually set the heights on the `.profile` elements which are deeply nested within `.row` (thus why I change the `filter` setting to 'find' instead of 'children').

You could also set the heights on only some of the children with options like this:

```js
$('.row').equalHeights({filter: 'children', selector: '.odd'})
```

Note that this pull request depends on #11, since the caching of the jQuery objects made it so that the new options only needed to be used in one place rather than using them over and over in the repeated selector calls.