| | #1 |
| Active Warrior Join Date: 2011 Location: new jersey
Posts: 46
Thanks: 1
Thanked 3 Times in 2 Posts
|
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 | |
| |
| | #2 |
| Bananas are Yellow! Registered Member War Room Member Join Date: 2013 Location: Wyoming, PA, USA
Posts: 1,046
Thanks: 2,549
Thanked 1,600 Times in 928 Posts
Blog Entries: 4 |
Change the "q1" to "q2" in the second instance.
|
| Put MY voice on YOUR video: AwesomeAmericanAudio.com | |
| |
| | #3 |
| Developer War Room Member Join Date: 2011 Location: Dublin, Ireland
Posts: 363
Thanks: 5
Thanked 48 Times in 47 Posts
|
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. |
| |
|
| Bookmarks |
| Tags |
| hide, show, video |
| |