Overview
The Fancy Letter Plugin lets you prettify your web page by styling the first letter of any element while keeping the HTML markup clean and readable by both human and machine.If you like this plugin and you're feeling generous, perhaps you'd also like to visit my amazon.com wish list?
Quick Start Guide
Include the jQuery core file and the Fancy Letter plugin in the
<head>
of your document. After these scripts are referenced, you can reference a custom script file to add your fancy letters (preferred) or enter the script directly in the <head>
(shown below).<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.fancyletter.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
// simple example wraps the first letter of
$('div.content p').fancyletter();
});
</script>
Fancy letters are wrapped in a span tag. Each span is given two classes: a common class ("fancy-letter" by default) and a "letter" class.Add CSS to style the fancy letters.
For example, after applying the .fancyletter()
method to: <p>This paragraph</p>
it might look like this:
<p><span class="fancy-letter ltr-t">T</span>his paragraph</p>
.Add HTML markup to your page for elements that you want to begin with a fancy letter.
No comments:
Post a Comment