artberri/sidr — pull request #194 by esolitos (2014-07-31 08:31:37+00:00)
Title: Added support for a settings "skip if has prefix" on attributes.

Hi, I was working with Sidr and Font-Awesome and I needed Sidr to rewrite the id and classes but leave untouched the FA classes so i come up with this new setting ``skipPrefix`` that will be used to skip the rewrite of the classes starting with a specific prefix.

For *prefix* i intend:
- A complete class name.
- A class that starts with the prefix followed by a dash or an underscore.

Example (will skip the Font-Awsome classes):
```
$("#menu-toggle").sidr({
skipPrefix: 'fa',
name: 'main-menu-left',
side: 'left',
source: '.navigation',
displace: ( $win.width() < 480 ),
});
```

This example will skip all the classes: ``fa``, ``fa-*`` and ``fa_*``.

*Bonus*: Since the parameter is put in a regex it's possible to pass something like ``((?:prefix1)|(prefix2))`` to look for more prefixes.

Esolitos