{"_id":"jquery-textfill","_rev":"4-8496f8bebbc180672b260f9255d2591c","name":"jquery-textfill","description":"This jQuery plugin resizes text to make it fit into a container. The font size gets as big as possible. http://jquery-textfill.github.io/","dist-tags":{"latest":"0.6.0"},"versions":{"0.6.0":{"name":"jquery-textfill","version":"0.6.0","description":"This jQuery plugin resizes text to make it fit into a container. The font size gets as big as possible. http://jquery-textfill.github.io/","repository":{"type":"git","url":"https://github.com/jquery-textfill/jquery-textfill"},"author":{"name":"jQuery TextFill contributors","email":"https://github.com/jquery-textfill/jquery-textfill"},"license":"MIT","bugs":{"url":"https://github.com/jquery-textfill/jquery-textfill/issues"},"homepage":"https://github.com/jquery-textfill/jquery-textfill","gitHead":"31cf6653dfa1b30fb496b5e74497299484b2821f","_id":"jquery-textfill@0.6.0","scripts":{},"_shasum":"257822cfce4c4a1ad9a19e7b17c525f034f8b2b0","_from":"./","_npmVersion":"1.4.23","_npmUser":{"name":"pwlin","email":"pwlin05@gmail.com"},"maintainers":[{"name":"pwlin","email":"pwlin05@gmail.com"}],"dist":{"shasum":"257822cfce4c4a1ad9a19e7b17c525f034f8b2b0","tarball":"https://registry.npmjs.org/jquery-textfill/-/jquery-textfill-0.6.0.tgz","integrity":"sha512-fB1BQNf72+IN+gNKWDr6V8FjfeNQGZ3synXx5HESzC6vZKERmegl5MfJFZMyUFZ61bIisDIRnVaNv2Z6FMXPkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQ8z0IzCQGZsnriYKscMzSogoQdG9MQ9u4Phx1kRH/BgIhALfLv0phpwbos1bUC/mfdfR3Qx/70cKXDKthRoc7O//x"}]}}},"readme":"# jQuery TextFill\n\nThis jQuery plugin resizes text to make it fit into a container. The font size\ngets as big as possible.\n\n* [Homepage][index].\n* [Simple example][demo].\n* [Unit tests (assure plugin correctness)][tests].\n\n![logo](http://jquery-textfill.github.io/images/logo.png)\n\n## Usage\n\n- Remember to include _jQuery_ and _jQuery TextFill_:\n\n```html\n<script src=\"jquery.min.js\"></script>\n<script src=\"jquery.textfill.min.js\"></script>\n```\n\n- Select which element you'll use. Make sure to:\n  - Specify the parent's width and height\n  - Put the text inside of a `<span/>` child by default (see _Options_ to change this)\n\n```html\n<div id='my-element' style='width:100px;height:50px;'>\n  <span>The quick brown fox jumps over the lazy dog</span>\n</div>\n```\n\n- Initialize _jQuery TextFill_\n\n```js\n$('#my-element').textfill({\n    ...options...\n});\n```\n\n## Options\n\nRemember, **container** means the _parent_ element, while **child** is the\nelement that will _resize_. On the example above, the parent was the `div` and the\nchild was the `span`.\n\n| Name              | Description | Default Value |\n| ----------------- | ----------- | ------------- |\n| `minFontPixels`   | Minimal font size (in pixels). The text will shrink up to this value. | 4 |\n| `maxFontPixels`   | Maximum font size (in pixels). The text will stretch up to this value.. If it's a negative value (`size <= 0`), the text will stretch to as big as the container can accommodate. | 40 |\n| `innerTag`        | The child element tag to resize. We select it by using `$(innerTag + ':visible:first', container)` | `span` |\n| `widthOnly`       | Will only resize to the width restraint. The font might become tiny under small containers.  | `false` |\n| `explicitWidth`   | Explicit width to resize. Defaults to the container's width. | `null` |\n| `explicitHeight`  | Explicit height to resize. Defaults to the container's height. | `null` |\n| `changeLineHeight`  | Also change the `line-height` of the parent container. This might be useful when shrinking to a small container. | `false` |\n| `debug`           | Output debugging messages to console. | `false` |\n\nFor example,\n\n```html\n<script>\n$(function() {\n    $('#my-element').textfill({\n        maxFontPixels: 36\n    });\n});\n</script>\n```\n\n## Callbacks\n\n| Name       | Called when...                       | Default Value |\n| ---------- | ------------------------------------ | ------------- |\n| `success`  | Called when a resizing is successful | `null`        |\n| `fail`     | Called when a resizing is failed     | `null`        |\n| `complete` | Called when all elements are done    | `null`        |\n\nFor example,\n\n```html\n<script>\n$(function() {\n    $('#my-element').textfill({\n        success: function() {\n\t\t    console.log(\"yay!\")\n\t\t},\n\t\tfail: function() {\n\t\t    alert(\"boo hoo!\")\n\t\t}\n    });\n});\n</script>\n```\n\n## Contributing\n\nYou are very welcome to contribute!\n[A good number of people did](https://github.com/jquery-textfill/jquery-textfill/graphs/contributors),\nso feel free to help no matter how small the changes might be.\n\nJust _make sure_ to read the file [`CONTRIBUTING.md`](CONTRIBUTING.md) first.\nThere we make a quick take on how you could help us.\n\nAlso, there we lay down our rules for _reporting issues_ and _making pull\nrequests_. Gotcha! Now you can't say we didn't told you about it!\n\nIf you found something critical or just want to make a suggestion\n[open an issue][issue] and start typing right away.\n\n## Credits\n\nThis jQuery plugin was created by [Russ Painter][russ] around May 2009,\nbeginning with a StackOverflow [question][soq].\n\nIn very early 2012, [Yu-Jie Lin][yu] helped to move the project to GitHub with\nversion _0.1_ and obtained the clearly stated open source licensing from Russ.\n\nAround July 2014 [Alexandre Dantas][alex] was made a contributor, currently\nmaintaining the project.\n\n## License\n\n`jquery-textfill` is licensed under the _MIT License_. See file\n[`COPYING.md`](COPYING.md) to see what you can and cannot do with the\nsource.\n\n    Copyright (c) 2014 Alexandre Dantas\n    Copyright (c) 2012-2013 Yu-Jie Lin\n    Copyright (c) 2009 Russ Painter\n\n[index]:  http://jquery-textfill.github.io/\n[demo]:   http://jquery-textfill.github.io/example/\n[tests]:  http://jquery-textfill.github.io/unit-tests\n[issue]:  https://github.com/jquery-textfill/jquery-textfill/issues\n[soq]:    http://stackoverflow.com/questions/687998/auto-size-dynamic-text-to-fill-fixed-size-container\n[russ]:   https://github.com/GeekyMonkey\n[yu]:     https://github.com/livibetter\n[alex]:   https://github.com/alexdantas\n\n","maintainers":[{"name":"pwlin","email":"pwlin05@gmail.com"}],"time":{"modified":"2022-06-19T05:14:00.124Z","created":"2014-09-06T20:21:47.153Z","0.6.0":"2014-09-06T20:21:47.153Z"},"homepage":"https://github.com/jquery-textfill/jquery-textfill","repository":{"type":"git","url":"https://github.com/jquery-textfill/jquery-textfill"},"author":{"name":"jQuery TextFill contributors","email":"https://github.com/jquery-textfill/jquery-textfill"},"bugs":{"url":"https://github.com/jquery-textfill/jquery-textfill/issues"},"license":"MIT","readmeFilename":"README.md"}