Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<title>Sandbox</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
body { background-color: #000; font: 16px Helvetica, Arial; color: #fff; }
input {font-size:1.2em; padding:6px; font-weight:700; margin: 3px 0;}
</style>
</head>
<body>
  <p>Options for the plugin include 'maxWidth' / 'minWidth' and 'comfortZone' (all pixel values). The "comfort zone" (default: 70) is the amount of space between the end of the text and the end of the input. The minWidth is, by default, the starting width of the input element and the maxWidth is, by default, 1000px.</p> 
  <pre> 
  // Options are passed like this:
$('input#myinput').autoGrowInput({
    comfortZone: 10,
    minWidth: 100,
    maxWidth: 400
});
  </pre> 
  <input style="width:100px" /><br/> 
  <input style="width:200px" /><br/> 
  <input style="width:300px" /><br/> 
  <input style="width:400px" /> 
</body>
</html>
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers