Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/craigerskine/jquery-fancy-letter
jQuery plugin to wrap the first letter of an element in a class that contains that letter's character. Basically a more powerful :first-letter option.
https://github.com/craigerskine/jquery-fancy-letter
jquery jquery-plugin
Last synced: 13 days ago
JSON representation
jQuery plugin to wrap the first letter of an element in a class that contains that letter's character. Basically a more powerful :first-letter option.
- Host: GitHub
- URL: https://github.com/craigerskine/jquery-fancy-letter
- Owner: craigerskine
- License: apache-2.0
- Created: 2018-02-09T21:05:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-12T14:11:00.000Z (over 2 years ago)
- Last Synced: 2024-11-16T19:15:40.289Z (2 months ago)
- Topics: jquery, jquery-plugin
- Language: HTML
- Homepage: https://craigerskine.github.io/jquery-fancy-letter/
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# jquery.fancyletter.js
Requires jQuery.
### Usage
```code
$(selector).fancyletter();
```selector = your element you'd like to manipulate
### Options
```
{
// base class of character
commonClass: 'ltr',
// prefix class of character - actual lowercase character will get appended to this string
prefixClass: 'ltr-',
// if you want to match things other than letters, you better be good at regex
characters: '[a-zA-Z]'
}
```### Example
```html
Chicken
Foo
Bar
$('.blah').fancyletter();
```
### Result
```html
Chicken
Foo
Bar
```