»
EnglishFrenchVietnamese

Print - Expand-Collapse Paragraph - JavaScriptBank.com

Full version: jsB@nk » Form » Expand-Collapse Paragraph
URL: https://www.javascriptbank.com/expand-collapse-paragraph.html

Expand-Collapse Paragraph © JavaScriptBank.comNeed to display a lot of information in a limited area? This JavaScript will display/hide the information at the click of a button. There is no limit to the amount of information you can add or sections you can use. Excellent for F.A.Qs.

Full version: jsB@nk » Form » Expand-Collapse Paragraph
URL: https://www.javascriptbank.com/expand-collapse-paragraph.html



CSS
<style type=text/css>input.button {  color: #fff; background: #0034D0;  font-size: .8em;  font-weight:bold;  font-family: Verdana, Arial, Helvetica, sans-serif;  border: solid 1px #ffcf31;}</style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script type="text/javascript">/* This script and many more are available free online atThe JavaScript Source :: http://javascript.internet.comCreated by: Ultimater, Mr J :: http://www.webdeveloper.com/forum/showthread.php?t=77389 */function toggleMe(a){  var e=document.getElementById(a);  if(!e)return true;  if(e.style.display=="none"){    e.style.display="block"  } else {    e.style.display="none"  }  return true;}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<div id="para1" style="display:none">Yes, all the scripts on this site are free for personal or business use. The only requirement for using them is that you leave the credit information inside the script.</div><br><input type="button" class="button" onclick="return toggleMe('para1')" value="Are the JavaScripts here free?"><br><div id="para2" style="display:none"><br>JavaScript is NOT Java. JavaScript is a basic scripting language that allows Web authors to create dynamic pages that react to user interaction.</div><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->