https://github.com/rmosolgo/bootstrap-teaser
Paragraph preview/teaser for Twitter Bootstrap/jQuery
https://github.com/rmosolgo/bootstrap-teaser
Last synced: 3 months ago
JSON representation
Paragraph preview/teaser for Twitter Bootstrap/jQuery
- Host: GitHub
- URL: https://github.com/rmosolgo/bootstrap-teaser
- Owner: rmosolgo
- Created: 2013-04-23T18:30:34.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-11-20T16:13:29.000Z (about 12 years ago)
- Last Synced: 2025-08-17T18:22:12.505Z (5 months ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Bootstrap-Teaser
A [jQuery](http://jquery.com/) plugin for [Twitter Bootstrap](http://twitter.github.io/bootstrap/) which uses the first few sentances of html as a teaser and shows a "See more..." link to show all the html.
See it in action [on Bl.ocks](http://bl.ocks.org/rmosolgo/raw/5446195/).
Gives a preview of paragraph contents and a link to see the rest of the paragraph.
## Usage
### Basic
- Include `bootstrap-teaser.js` in your page:
```HTML
```
- Add `class="teaser"` to an element and the _first sentence_ will be used as a teaser and a _See more..._ link will be created for you.
### Settings
Add `data-teaser-length` to the element to specify the number of sentences, eg `data-teaser-length=3` will show the first three sentences as a preview.
The created _See more..._ link has class `text-info` -- so it will be affected by other changes to that Bootstrap class.