Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acrogenesis/autosize
Rails Gem - jQuery plugin for dynamic textarea sizing
https://github.com/acrogenesis/autosize
Last synced: 17 days ago
JSON representation
Rails Gem - jQuery plugin for dynamic textarea sizing
- Host: GitHub
- URL: https://github.com/acrogenesis/autosize
- Owner: acrogenesis
- License: mit
- Created: 2014-01-06T09:38:36.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-26T17:14:26.000Z (over 7 years ago)
- Last Synced: 2024-10-12T13:36:07.358Z (about 1 month ago)
- Language: Ruby
- Homepage: http://www.jacklmoore.com/autosize/
- Size: 18.6 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
Autosize
============This gem bundles the contents of the [Autosize Plugin](https://github.com/jackmoore/autosize) from Jack Moore
Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.
## Usage
```
The autosize function accepts a single textarea element, or an array or array-like object (such as a NodeList or jQuery collection) of textarea elements.// from a NodeList
autosize(document.querySelectorAll('textarea'));// from a single Node
autosize(document.querySelector('textarea'));// from a jQuery collection
autosize($('textarea'));
```See the [project page](http://jacklmoore.com/autosize/) for documentation, caveats, and a demonstration.
## Install
add `gem 'autosize'` to your `Gemfile` (and then run `bundle install`).
And in your application.js:
`//= require autosize`Contributing
------------1. Fork it.
2. Create a branch (`git checkout -b my_markup`)
3. Commit your changes (`git commit -am "Cool new feature"`)
4. Push to the branch (`git push origin my_markup`)
5. Open a [Pull Request][1]
6. Enjoy a refreshing 'Insert Favorite Beverage' and wait