Apr 16, 2014 in Layout 3034 views
Capital Letter is A simple, lightweight jQuery plugin that allows you to add Capital Letters to any text in the page, it's easy to use and customize.
1. INCLUDE JS FILES
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript" src="capital-0.1.min.js"></script>
2. HTML
<article class='article'> <p>This plugin allows you to add Capital Letters to any text in the page, it's easy to use and customize. This examples uses a webfont for the capital letter so it looks much nicer.</p> </article>
3. JAVASCRIPT
// Apply it to all <p> inside <article> $('article p').CapitalLetter();
4. OPTIONS
You can pass in any CSS you like to be applied to the capital letter
$('article p').CapitalLetter({ color: "#02AD08" 'float': 'left', 'padding': 0, 'margin': '0 0.1em 0 0', 'color': '#CC3300' });
Tagged with:
capital letter
creating awesome
capital letters
capital
letters
paragraph
add capital
capital letters to text
Related Articles