PDA

View Full Version : Expanding div's upon user interaction



anisha35
08-31-2009, 12:19 PM
I've figured out how to embed YouTube videos into a vBulletin installation of mine. How would I go about making a vertically expanding table that expand when the user would click on the "YouTube" text? I'm thinking of starting out out as a size maybe 100px high and 400px wide, and expand to 375px high and 450px tall. I've checked Google, but nothing seemed to come up that I could use.

LDHosting
09-01-2009, 09:51 AM
I'm no JavaScript coder but I believe you'd be able to use it to do this. It would require you to keep the height and width properties in the HTML code however, and I've only once done this with a DIV so I don't know if it'll work for a table.

I used document.getElementById() to call the ID of the div, and then you're probably looking for div.style.height and div.style.width just to give you an idea of its syntax.

You'd need to turn the youtube text into a button of some sort, and use an onclick= to call the JavaScript function.

I know this isn't very detailed but I hope it'll help point you into the right direction.

micronhosting
10-13-2009, 01:44 PM
I've figured out how to embed YouTube videos into a vBulletin installation of mine. How would I go about making a vertically expanding table that expand when the user would click on the "YouTube" text? I'm thinking of starting out out as a size maybe 100px high and 400px wide, and expand to 375px high and 450px tall. I've checked Google, but nothing seemed to come up that I could use.

This can't be done in base html. You'll need to run a browser based script (java, or ajax) to accomplish this. But it is certainly possible.

Fireman
10-19-2009, 04:45 AM
i have no experience about it.. but i have one solution.. try to find in Google.. and any source code provider website... like www.hotscripts.com.... i sure your problem will be solve

~ServerPoint~
10-19-2009, 04:47 AM
i have no experience about it.. but i have one solution.. try to find in Google.. and any source code provider website... like www.hotscripts.com.... i sure your problem will be solve

I agree that is the best collection of free and paid scripts