Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-10-2008, 09:28 AM   PM User | #1
rogerrkh
New to the CF scene

 
Join Date: Oct 2008
Location: Littlehampton, West Sussex, England
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rogerrkh is an unknown quantity at this point
Collapsible text

Hi there

A while ago I was searching the web for suitable snippets of code for a web site that I was designing.

On one site I cannot remember the URL I found a snippet of code that allows a text box to collapse. At the time I thought what a stupid idea who would want that.

Now I can see a very good reason for putting it on the site and will eternally regret not downloading it at the time.

I was wondering if anyone out there what site this little snippet is on. I cannot remember if it was Javascript or css as at the time I was searching for both.

I you know where I can find this site then please send me a link to same.

Thank you
rogerrkh is offline   Reply With Quote
Old 10-10-2008, 10:05 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
This can be done in many ways like, automatic resize with content, drag and resize by mouse, one click expand/contract etc.

You'd get plenty of example from google by a search like http://www.google.com/search?q=javas...xpand+textarea

PS: Welcome to CF
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

Last edited by abduraooft; 10-10-2008 at 10:08 AM..
abduraooft is offline   Reply With Quote
Old 10-10-2008, 10:19 AM   PM User | #3
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
Could be of interest:
Code:
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js"></script>
<script type="text/javascript">
$(document).ready(function()
	{
	$('#trig').click(function()
		{
		if(this.value.toLowerCase()=='expand')
			{
			$('#mytxt').animate({height:'300px'},1000);
			this.value='Collapse';
			}
		else
			{
			$('#mytxt').animate({height:'22px'},1000);
			this.value='Expand';
			}
		});
	});
</script>
<input type="text" id="mytxt"><br><input type="button" value="Expand" style="margin-top:10px;" id="trig">
__________________
Learn how to javascript at 02geek

The more you learn, the more you'll realize there's much more to learn
Ray.ph
rangana is offline   Reply With Quote
Old 10-10-2008, 06:46 PM   PM User | #4
rogerrkh
New to the CF scene

 
Join Date: Oct 2008
Location: Littlehampton, West Sussex, England
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rogerrkh is an unknown quantity at this point
Thanks I will try this when I get time.

My main Computer has just failed so I am currently using my lap top and whereas I have an internet connection all my files for the site are on my main computer so I will be busy downloading files to my laptop for a while.
rogerrkh is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:32 AM.


Advertisement
Log in to turn off these ads.