Permalink
Browse files

Major cleanup and added some new functionality

  • Loading branch information...
1 parent 7e81348 commit 1719f1a88706b31279970be3e147b994b9b21495 @DanielHoffmann committed May 12, 2014
Showing with 250 additions and 216 deletions.
  1. +1 −0 .gitignore
  2. +3 −0 CONTRIBUTORS.md
  3. +18 −21 README.md
  4. +111 −81 { → examples}/example.html
  5. +0 −6 jquery-1.10.1.min.js
  6. +117 −108 jquery-bigtext.js
View
@@ -0,0 +1 @@
+/.project
View
@@ -0,0 +1,3 @@
+David Barker
+Maxim Novoselov
+Jay Falco
View
@@ -8,7 +8,7 @@ jQuery 1.3.1 or higher
Browser Compatibility
==============
-Internet Explorer 9 or higher
+Internet Explorer 9 or higher (might work on older versions)
Opera
@@ -33,44 +33,41 @@ $("#span").bigText();
With one simple line the text "BigText" will now have its font-size increased but without overflowing the div.
-See more examples in https://rawgithub.com/DanielHoffmann/jquery-bigtext/master/example.html
+See more examples in https://rawgithub.com/DanielHoffmann/jquery-bigtext/master/examples/example.html
Usage
==============
```javascript
$("#div").bigText({
- padding: {Number},
- rotateText: {Number},
- fontSizeFactor: {Number}, (0.8)
- maximumFontSize: {Number},
- minimumFontSize: {Number},
- limitingDimension: {String}, ("both")
- center: {Boolean}, (true)
- centerVertically: {Boolean}, (true)
- wrapAfterMin: {Boolean} (false)
+ rotateText: {Number}, (null)
+ fontSizeFactor: {Number}, (0.8)
+ maximumFontSize: {Number}, (null)
+ limitingDimension: {Number}, ("both")
+ horizontalAlign: {String}, ("center")
+ verticalAlign: {String}, ("center")
+ textAlign: {String}, ("center")
});
```
Options
==============
-padding: Add X pixels of padding to the parent element. The plugin understands padding added through CSS, this is only a convenience feature
+rotateText: Rotates the text inside the element by X degrees.
-rotateText: Rotates the text inside the element by X degrees. Note: The plugin, unlike padding on the parent element, does not support setting the rotation of the text element in CSS. You must set it through the $.bigText() options.
-
-fontSizeFactor: default is 0.8, it's used to give some vertical spacing for letters that overflow the line-height (like 'g', 'Á' and most other accentuated uppercase letters). This does not affect the font-size if the limiting factor is the width of the parent div.
+fontSizeFactor: This option is used to give some vertical spacing for letters that overflow the line-height (like 'g', 'Á' and most other accentuated uppercase letters). This does not affect the font-size if the limiting factor is the width of the parent div. The default is 0.8
maximumFontSize: maximum font size to use.
-minimumFontSize: minimum font size to use.
-
-limitingDimension: in which dimension the font size should be limited. Possible values: "width", "height" or "both". Defaults to both. Using this option overwrites the element parent width or height.
+limitingDimension: In which dimension the font size should be limited. Possible values: "width", "height" or "both". Defaults to both. Using this option with values different than "both" overwrites the element parent width or height.
-center: Centers the text horizontally. Defaults to true.
+horizontalAlign: Where to align the text horizontally. Possible values: "left", "center", "right". Defaults to "center".
-centerVertically: Centers the text vectically. Defaults to true.
+verticalAlign: Where to align the text vertically. Possible values: "top", "center", "bottom". Defaults to "center".
-wrapAfterMin: Allows wrapping of the text once the minimumFontSize is reached.
+textAlign: Sets the text align of the element. Possible values: "left", "center", "right". Defaults to "center". This option is only useful if there are linebreaks (<br> tags) inside the text.
+License
+==============
+This project is released under the MIT license.
Oops, something went wrong.

0 comments on commit 1719f1a

Please sign in to comment.