Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "advanced" bullet selector example #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The following classes are available on your bullet elements.
</tr>
</table>

### Data Atrributes
### Data Attributes

The default behaviour, when the option value is `true`, is to look for elements with `data-bespoke-bullet` attributes:

Expand All @@ -95,6 +95,19 @@ bespoke.horizontal.from('article', {
</article>
```

## Advanced bullet selectors

Modifying the bullet selector can be quite powerful, as in this example:

- Make `li` elements bullets, but exclude lists from being bulleted by adding the `no-bullets` class to the `ul`/`ol` tags.
- Make arbitrary elements, like `h2`/`p`/`code`, bullets with the class `bullet`. Because the first bespoke-bullets item on each slide is shown automatically, you might want to add `bullet` to an arbitrary element before your first bullet-like element.

```js
bespoke.horizontal.from('article', {
bullets: 'ul:not(.no-bullets) li, ol:not(.no-bullets) li, .bullet'
});
```

## Questions?

Contact me on GitHub or Twitter: [@markdalgleish](http://twitter.com/markdalgleish)
Expand All @@ -103,4 +116,4 @@ Contact me on GitHub or Twitter: [@markdalgleish](http://twitter.com/markdalglei

Copyright 2013, Mark Dalgleish
This content is released under the MIT license
http://markdalgleish.mit-license.org
http://markdalgleish.mit-license.org