Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yougov/jquery.shyphen
https://github.com/yougov/jquery.shyphen
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yougov/jquery.shyphen
- Owner: yougov
- License: mit
- Created: 2014-12-11T17:06:32.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-18T13:11:33.000Z (over 9 years ago)
- Last Synced: 2024-05-02T00:07:39.668Z (8 months ago)
- Language: JavaScript
- Size: 234 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# Shyphen
Insert soft hyphens into text nodes as necessary to avoid overflow.
Browsers will sooner break a word up, even with CSS hyphens, than put the word
on a new line. This plugin tries to avoid that.Tested and working in IE7+, Chrome 39, Firefox 34, iOS 7.1.
## When not to use Shyphen
Don't use Shyphen if you want to hyphenate a large body of text, for instance,
to justify all text. There are [better solutions][hyphenator] for that.[hyphenator]: https://code.google.com/p/hyphenator/
## Getting Started
Download a copy of [jquery.textnodes][textnodes] - Shyphen depends on it.Download the [development version][max].
[dev]: https://raw.github.com/yougov/jquery.shyphen/master/src/shyphen.js
[textnodes]: https://github.com/yougov/jquery.textnodesIn your web page:
```html
jQuery(function($) {
$('.things').shyphen();
});```