Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > PHP Development
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 10-11-2009, 09:16 AM   #1 (permalink)
zmoerf
Junior Member
 
Join Date: Oct 2009
Posts: 3
Default How To create autogrow textarea with jQuery

This plugin makes it easy to have auto-growing textareas. Meaning, if you have a textarea, as the user types it will expand vertically to accommodate the size of the entry. This was inspired by Facebook's auto-expanding text areas.
To make a textarea autogrow, simply do this

1. download jsquery plugin : http://plugins.jquery.com/files/jque...ow-1.0.2.1.zip
2. extract to you localhost folder and crate dome.html file
call jquery javascript
Code:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.autogrow.js"></script>
crate function javascript
Code:
<script type="text/javascript">
$(document).ready (function() {
	
	$('textarea.expanding').autogrow();
							
});
</script>

<style type="text/css">
textarea.expanding {
	line-height: 18px;
}

</style>
and then make your textarea form
Code:
<form>
<textarea style="width: 400px; height: 84px; min-height: 84px;" class="expanding" name="myTextarea"></textarea> example 1 <br>
<textarea class="expanding" style="max-height: 100px" name="myTextarea2"></textarea> example 2
</form>
you can see demo : http://www.ajax-tutorial.net/downloa...area-autogrow/
download file demo have modification: ajax textarea auto-grow | Ajax Tutorial
zmoerf is offline   Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View:
Points Per Thread:
Points Per Reply:



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:47 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums