Autowidthjs
Automatically adjusts the width of the object input to the width of the content. DEMO: http://jsbin.com/ahaxe
Installation
Add this line to your application's Gemfile:
gem 'autowidthjs'
And then execute:
$ bundle
Or install it yourself as:
$ gem install autowidthjs
Usage
Add to your application.js:
//= require jquery.autowidth
And to your *.js:
$('input#yourinput').autoGrowInput({
comfortZone: 50, // Zone after text in input
minWidth: 200, // Minimal input width
maxWidth: 2000 // Maximal input width
});
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request