It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Accordion

Accordion

Postby Johnathan on Mon May 05, 2008 1:36 am

Code: Select all
<div id="basic-accordian" ><!--Parent of the Accordion-->


<!--Start of each accordion item-->
  <div id="test-header" class="accordion_headings header_highlight" >Win  Downloads</div>
  <!--Heading of the accordion ( clicked to show n hide ) -->
 
  <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
 
  <div id="test-content"><!--DIV which show/hide on click of header-->
 
     <!--This DIV is for inline styling like padding...-->
    <div class="accordion_child"><a href="win-3di.php">3D/Imageing</a><br />
        <a href="win-av.php">Audio Visual</a><br />
        <a href="win-web.php">Web Design/Development</a><br />
        <a href="win-office.php">Office/Print</a>
        </p>
      </div>
   
  </div>
<!--End of each accordion item-->


<!--Start of each accordion item-->
  <div id="test1-header" class="accordion_headings" >Mac Downloads</div>
  <!--Heading of the accordion ( clicked to show n hide ) -->
 
  <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
 
  <div id="test1-content"><!--DIV which show/hide on click of header-->
 
     <!--This DIV is for inline styling like padding...-->
    <div class="accordion_child"><a href="mac-3di.php">3D/Imageing</a><br />
      <a href="mac-av.php">Audio Visual</a><br />
      <a href="mac-web.php">Web Design/Development</a><br />
      <a href="mac-office.php">Office/Print
      </a></div>
   
  </div>
<!--End of each accordion item-->



<!--Start of each accordion item-->
  <div id="test2-header" class="accordion_headings" >Photoshop</div>
  <!--Heading of the accordion ( clicked to show n hide ) -->
 
  <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
 
  <div id="test2-content"><!--DIV which show/hide on click of header-->
 
     <!--This DIV is for inline styling like padding...-->
    <div class="accordion_child"><a href="ps-brushes.php">Brushes</a><br />
      <a href="ps-patterns.php">Patterns
      </a><br />
      <a href="ps-gradients.php">Gradients
      </a><br />
      <a href="ps-plugins.php">Plugins</a><br />
      <a href="ps-presets.php">Presets</a></div>
   
  </div>
<!--End of each accordion item-->

<!--Start of each accordion item-->
  <div id="test2-header" class="accordion_headings" >Scripts</div>
  <!--Heading of the accordion ( clicked to show n hide ) -->
 
  <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
 
  <div id="test2-content"><!--DIV which show/hide on click of header-->
 
     <!--This DIV is for inline styling like padding...-->
    <div class="accordion_child"><a href="scripts-php.php">PHP</a><br />
      <a href="scripts-js.php">Javascript </a><br />
      <a href="scripts-html.php">(X)HTML </a><br />
      <a href="scripts-css.php">CSS</a><br />
      <a href="scripts-xml.php">XML</a></div>
   
  </div>
<!--End of each accordion item-->

<!--Start of each accordion item-->
  <div id="test2-header" class="accordion_headings" >Other</div>
  <!--Heading of the accordion ( clicked to show n hide ) -->
 
  <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
 
  <div id="test2-content"><!--DIV which show/hide on click of header-->
 
     <!--This DIV is for inline styling like padding...-->
    <div class="accordion_child">
   
           <script type="text/javascript">
//<![CDATA[
<!--
google_ad_client = "pub-1424534937120197";
/* 200x90, created 4/27/08 */
google_ad_slot = "3527801093";
google_ad_width = 200;
google_ad_height = 90;
//-->
//]]>
        </script>
        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br />

    </div>
  </div>
</div>



Anyone know why the Scripts and Other tabs aren't cloding and just staying open? The original script had three tabs and I just copied and pasted the stuff I though I needed but it isn't working properly. Here's the link to the page http://www.jbportal.net/downloads_copy.php

Oh, and how can I make it start closed?
Johnathan
1000+ Club
 
Posts: 1207
Joined: Thu May 31, 2007 3:28 pm
Location: Belfast, Northen Ireland

Postby rangana on Tue May 06, 2008 12:05 am

Could you link us to the original page where these codes came ;)
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby Johnathan on Tue May 06, 2008 12:07 am

It's ok I think I got it now :) http://www.jbportal.net/downloads_copy.php Only thing I would like to change is to have them all closed when the page loads instead of the Windows Downloads being open
Johnathan
1000+ Club
 
Posts: 1207
Joined: Thu May 31, 2007 3:28 pm
Location: Belfast, Northen Ireland

Postby rangana on Tue May 06, 2008 12:09 am

I don't get it, when I get into your page...Only the Window Downloads link is open!?
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby Johnathan on Tue May 06, 2008 12:11 am

Yea, but I don't want any of them to be open. Well I didn't but now I think it looks ok. Just one last thing, can I round the corners using CSS?
Johnathan
1000+ Club
 
Posts: 1207
Joined: Thu May 31, 2007 3:28 pm
Location: Belfast, Northen Ireland

Postby Johnathan on Tue May 06, 2008 12:12 am

Actually i don't want them rounded, it wont fit in with the rest of the site.
Johnathan
1000+ Club
 
Posts: 1207
Joined: Thu May 31, 2007 3:28 pm
Location: Belfast, Northen Ireland

Postby rangana on Tue May 06, 2008 12:25 am

Johnathan wrote:Actually i don't want them rounded, it wont fit in with the rest of the site.


...So things are resolved?
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby Johnathan on Tue May 06, 2008 7:34 am

Yup :P.
Johnathan
1000+ Club
 
Posts: 1207
Joined: Thu May 31, 2007 3:28 pm
Location: Belfast, Northen Ireland


Who is online

Users browsing this forum: No registered users and 3 guests