Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Feb 27, 2017
1 parent b954dc5 commit aec7e41
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 694 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
@@ -1,5 +1,9 @@
# Changelog

- `v1.0.1 - 2017-02-27`
- Return this from function to support chaining
- Allow support for jQuery alternatives such as Zepto
- Fix readme instructions
- `v1.0.0 - 2017-01-25`
- Release stable v1
- Remove jquery dependency from bower.json to solve rails-assets problems
Expand Down
676 changes: 4 additions & 672 deletions LICENSE

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions README.md
@@ -1,17 +1,19 @@
# input-autogrow
<a href='https://ko-fi.com/A5071NK' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a' border='0' alt='Buy Me a Coffee' /></a>

`input-autogrow` is a jQuery plugin for autogrowing inputs. This plugin is different from others because most usually target `textarea` tags, this library is instead targeted at `input` tags.
`input-autogrow` is a plugin for autogrowing inputs. This plugin is different from others because most usually target `textarea` tags, this library is instead targeted at `input` tags.

Requires a DOM library such as jQuery, Zepto, or any that support $.fn extending.

# Install

#### Yarn, NPM, or Bower
```
yarn add chosen-material-theme
yarn add input-autogrow
npm install chosen-material-theme
npm install input-autogrow
bower install chosen-material-theme
bower install input-autogrow
```

#### Rails Install
Expand Down
7 changes: 4 additions & 3 deletions bower.json
@@ -1,7 +1,7 @@
{
"name": "input-autogrow",
"version": "1.0.0",
"description": "jQuery autogrow plugin for inputs",
"version": "1.0.1",
"description": "Autogrow plugin for inputs",
"main": "dist/input-autogrow.min.js",
"directories": {
"test": "test"
Expand All @@ -15,11 +15,12 @@
"auto-grow",
"input",
"jquery",
"zepto",
"javascript",
"js"
],
"author": "Weston Ganger",
"license": "GNU GPL",
"license": "MIT",
"bugs": {
"url": "https://github.com/westonganger/input-autogrow/issues"
},
Expand Down
8 changes: 4 additions & 4 deletions dist/input-autogrow.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions test/index.html → index.html
Expand Up @@ -8,7 +8,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">

<style>
body{
padding: 20px 40px;
}
</style>
</head>

<body>
<h1>Testing input-autogrow</h1>

Expand All @@ -17,9 +24,15 @@ <h1>Testing input-autogrow</h1>
</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="../src/input-autogrow.js"></script>
<!--
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
-->
<script src="src/input-autogrow.js"></script>

<script type="text/javascript">
$('input#mainInput').inputAutogrow({maxWidth: $('#mainInput').parent().width(), minWidth: $('input#mainInput').width(), trailingSpace: 10});
var parentWidth = $('#mainInput').parent().width();
var startWidth = $('input#mainInput').width();
$('input#mainInput').inputAutogrow({maxWidth: parentWidth, minWidth: startWidth, trailingSpace: 10});

//$('input#mainInput').inputAutogrow('destroy');
</script>
Expand Down
8 changes: 4 additions & 4 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "input-autogrow",
"version": "1.0.0",
"description": "jQuery autogrow plugin for inputs",
"version": "1.0.1",
"description": "Autogrow plugin for inputs",
"main": "dist/input-autogrow.min.js",
"directories": {
"test": "test"
Expand All @@ -15,17 +15,17 @@
"auto-grow",
"input",
"jquery",
"zepto",
"javascript",
"js"
],
"author": "Weston Ganger",
"license": "GNU GPL",
"license": "MIT",
"bugs": {
"url": "https://github.com/westonganger/input-autogrow/issues"
},
"homepage": "https://github.com/westonganger/input-autogrow",
"dependencies": {
"jquery": ">=1.0"
},
"devDependencies": {
"gulp": "*",
Expand Down
11 changes: 6 additions & 5 deletions src/input-autogrow.js
@@ -1,8 +1,8 @@
/*
* input-autogrow - jQuery autogrow plugin for inputs
* @version v1.0.0
* input-autogrow - Autogrow plugin for inputs
* @version v1.0.1
* @link http://github.com/westonganger/input-autogrow
* @license GNU GPL
* @license MIT
*/

(function($){
Expand Down Expand Up @@ -82,6 +82,7 @@

check(); //init on page load
});

return this;
}
}(jQuery));
};
}(window.jQuery || window.Zepto || window.$));

0 comments on commit aec7e41

Please sign in to comment.