Computer Geeks

Computer Geeks

Geek Shop

Geek News

Geek Stuff

Science Geek

Computer Gaming

Linux Chat

Building Websites

Computer Forums

Computer Help Forum

Computer Hardware Forum

Computer Software Programs


Go Back   Computer Forums > Building Websites

Building Websites This section covers all aspects of publishing, developing and maintaining websites. Topics include: website design, graphic design, website programming, web hosting, website marketing (SEO, link exchange, publicity, advertising), monetization & etc.

Computer Geeks
» Active Discussions
Computer Geeks
No Threads to Display.
» Other Websites
- Software Publishing

- Server Hardening
Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2010, 11:39 AM
JavaScriptBank JavaScriptBank is offline
Senior Member
GB Guru
 
Join Date: Sep 2009
Posts: 180
Default JavaScript codes for Web DEV

Good and Nice JavaScripts

FAQ Drop Down script

Need to create a F.A.Q for your Web site? Use this JavaScript to hide/reveal content on a Web page. Keep your long documents short.... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript
Code:
<script type="text/javascript">
<!-- Begin
// Created by: Fang :: http://tinyurl.com/7v7l8

function toggle(obj) {
// Moz. or IE
var sibling=(obj.nextSibling.nodeType==3)? obj.nextSibling.nextSibling : obj.nextSibling;
// hide or show
if(sibling.style.display=='' || sibling.style.display=='block') {
	sibling.style.display='none';
    obj.firstChild.firstChild.data='+';
    }
else {
	sibling.style.display='block';
    obj.firstChild.firstChild.data='-';
    }
}
//
function initCollapse() {
var oDT=document.getElementById('content').getElementsByTagName('dt');
for (var i=0; i < oDT.length; i++) {
	oDT[i].onclick=function() {toggle(this)};
    var oSpan=document.createElement('span');
    var sign=document.createTextNode('+');
    oSpan.appendChild(sign);
    oDT[i].insertBefore(oSpan, oDT[i].firstChild);
    oSpan.style.fontFamily='monospace';
    oSpan.style.paddingRight='0.5em';
    oDT[i].style.cursor='pointer';
    toggle(oDT[i]);
	}
oDT=null;
}
window.onload=function() {if(document.getElementById && document.createElement) {initCollapse();}}
//-->
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Place HTML below in your BODY section
HTML
Code:
<dl id="content">
    <dt>This is Question #1  <em class="sm">[click here]</em></dt>
      <dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam 
		nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat 
		volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation 
		ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. 
		Duis autem vel eum iriure dolor in hendrerit in.<br><br></dd>
    <dt>This is Question #2  <em class="sm">[click here]</em></dt>
      <dd>Ma quande lingues coalesce, li grammatica del resultant lingue es plu 
		simplic e regulari quam ti del coalescent lingues. Li nov lingua franca 
		va esser plu simplic e regulari quam li existent Europan lingues. It va 
		esser tam simplic quam Occidental: in fact, it va esser Occidental. A un 
		Angleso.<br><br></dd>
    <dt>This is Question #3  <em class="sm">[click here]</em></dt>

      <dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam 
		nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat 
		volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation 
		ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. 
		Duis autem vel eum iriure dolor in hendrerit in.</dd>
</dl>
</div>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->





JavaScript Make link open in new tab/window - JavaScript World clock - circumference calculator
Quote:
Originally Posted by Copyright
The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such site or resource.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript codes for Web DEV JavaScriptBank Building Websites 0 03-01-2010 06:57 PM
JavaScript codes for Web DEV JavaScriptBank Building Websites 0 02-09-2010 10:53 PM
JavaScript codes for Web DEV JavaScriptBank Building Websites 0 01-11-2010 10:17 AM
JavaScript codes for Web DEV JavaScriptBank Building Websites 0 12-13-2009 08:00 PM
JavaScript codes for Web DEV JavaScriptBank Building Websites 0 11-29-2009 08:15 PM

Powered by vBadvanced CMPS v3.2.3

All times are GMT -5. The time now is 08:24 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
HTML Help provided by HTML Help Central.