Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 31st Mar 2014, 05:01 AM   #1
Active Warrior
 
Dimagiba's Avatar
 
Join Date: 2011
Location: new jersey
Posts: 46
Thanks: 1
Thanked 3 Times in 2 Posts
Default
Help, How do you Hide and Show Video?
Share on: 
fb share twitter share gplus share more share

Hello, I already knew how to create a Hide and Show with video but my problem is I dont know how to make a 2 or more with something like that. When I tried duplicating the code it just show as the original.

I want to make something like Video 1 Youtube, Video 2 Vimeo etc.

Can you help me about this. Thankx

<<script type="text/javascript">
function toggle(obj) {
var obj=document.getElementById(obj);
if (obj.style.display == "block") obj.style.display = "none";
else obj.style.display = "block";
}
</script>

<a href="javascript: void(0);" onClick="toggle('q1')">Question 1</a>
<div id="q1" style="display:none;"><iframe width="560" height="315" src="//www.youtube.com/embed/wRcVgJjnFLo" frameborder="0" allowfullscreen></iframe></div>

Crack Games, Apps,Apk are all here Android Apk Games for free!
Try selling your stuff Buy and Sell Philippines
Dimagiba is offline  
Unread 1st Apr 2014, 04:28 AM   #2
Bananas are Yellow!
Registered Member
War Room Member
 
David Beroff's Avatar
 
Join Date: 2013
Location: Wyoming, PA, USA
Posts: 1,046
Thanks: 2,549
Thanked 1,600 Times in 928 Posts
Blog Entries: 4
Default
Re: Help, How do you Hide and Show Video?
Share on: 
fb share twitter share gplus share more share

Change the "q1" to "q2" in the second instance.

Put MY voice on YOUR video: AwesomeAmericanAudio.com
David Beroff is offline  
Unread 2nd Apr 2014, 06:34 AM   #3
Developer
War Room Member
 
K Meier's Avatar
 
Join Date: 2011
Location: Dublin, Ireland
Posts: 363
Thanks: 5
Thanked 48 Times in 47 Posts
Default
Re: Help, How do you Hide and Show Video?
Share on: 
fb share twitter share gplus share more share

As david already explained, you would need to change the ID in the HTML code. Both the div id and the toggle id.

onClick="toggle('q1')" becomes onClick="toggle('q2')"
<div id="q1" becomes <div id="q2"

and so on.
K Meier is offline  
Closed Thread


Bookmarks

Tags
hide, show, video


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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 10:31 PM.