View Full Version : Spoiler-Type Code
:Edzy
28-04-2007, 06:24 PM
Anyone know a code for like a spoiler which u can modify the text so like
FLASH HERE
But changing the text saying spoiler to summing else
Edited by Lµke (Forum Moderator): Thread Moved from Website Designing. Please post in the correct section next time, Thanks :).
Invent
28-04-2007, 06:27 PM
I have a JS code. Ill find it in a min.
I just use JS to change the style attributes of a DIV [:
Mr.OSH
28-04-2007, 06:28 PM
Anyone know a code for like a spoiler which u can modify the text so like
FLASH HERE
But changing the text saying spoiler to summing else
Like this?
Just put one set of the tags within the other set? :S I'm not sure what you mean..
:Edzy
28-04-2007, 06:28 PM
Thanks Si <3
+REP
Andys
28-04-2007, 06:31 PM
Whats the acctual code for a spoiler?
rofl
Invent
28-04-2007, 06:32 PM
Javascript:
<script language="javascript">
function drop(id){
var dropdiv=document.getElementById(id);
dropdiv.style.display=dropdiv.style.display=='none '? 'block' : 'block';
}
</script>
And for the HTML:
<a onClick="drop('rofl')">CLICKS ME</a>
<div id="rofl" style="display: none">hiyar!!1</div>
Mr.OSH
28-04-2007, 06:33 PM
javascript:
<script language="javascript">
function drop(id){
var dropdiv=document.getElementById(id);
dropdiv.style.display=dropdiv.style.display=='none '? 'block' : 'block';
}
</script>
And for the HTML:
<a onClick="drop('rofl')">CLICKS ME</a>
<div id="rofl" style="display: none">hiyar!!1</div>
Thanks for the code Simon, well done. :) + rep.
Aflux
28-04-2007, 06:37 PM
javascript:
<script language="javascript">
function drop(id){
var dropdiv=document.getElementById(id);
dropdiv.style.display=dropdiv.style.display=='none '? 'block' : 'block';
}
</script>
And for the HTML:
<a onClick="drop('rofl')">CLICKS ME</a>
<div id="rofl" style="display: none">hiyar!!1</div>
Would the same concept work say, if I had an image and the image closed/opened the div when clicked?
Just tell me if I'm making no sense. :)
:Edzy
28-04-2007, 07:10 PM
javascript:
<script language="javascript">
function drop(id){
var dropdiv=document.getElementById(id);
dropdiv.style.display=dropdiv.style.display=='none '? 'block' : 'block';
}
</script>
And for the HTML:
<a onClick="drop('rofl')">CLICKS ME</a>
<div id="rofl" style="display: none">hiyar!!1</div>
thanxxxxxx<3
Invent
28-04-2007, 08:38 PM
It would work fine with images Adam [:
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.