Results 1 to 2 of 2

Thread: Problem with accordian script

  1. #1
    Join Date
    Feb 2008
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem with accordian script

    1) Script Title: Accordian Content Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...daccordion.htm

    3) Describe problem:
    The main headings dont open on click.
    can be viewed at http://217.46.159.226/e_cart23/faq.php
    This is the full page
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    	<title><?php echo $page_title; ?></title>
    	<style type="text/css" media="screen">@import "./includes/layout.css";</style>
    				<link href="./includes/button_grey.css" media="screen"
        			rel="stylesheet" type="text/css" />
        			<link href="./includes/aero.css" media="screen"
        			rel="stylesheet" type="text/css" />
        			
        <script type="text/javascript" src="./includes/jquery-1.2.6.pack.js"></script>
    
        <script type="text/javascript" src="./includes/ddaccordion.js"></script>
        
        /***********************************************
    * Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/
      
      	<style type="text/css">
    
    .mypets{ /*header of 1st demo*/
    cursor: hand;
    cursor: pointer;
    padding: 2px 5px;
    border: 1px solid gray;
    color: black;
    background: #E1E1E1;
    }
    
    .openpet{ /*class added to contents of 1st demo when they are open*/
    background: yellow;
    }
    
    .technology{ /*header of 2nd demo*/
    cursor: hand;
    cursor: pointer;
    font: bold 14px Verdana;
    margin: 10px 0;
    }
    
    
    .openlanguage{ /*class added to contents of 2nd demo when they are open*/
    color: green;
    }
    
    .closedlanguage{ /*class added to contents of 2nd demo when they are closed*/
    color: red;
    }
    
    </style>
    
    <script type="text/javascript">
    
    //Initialize first demo:
    ddaccordion.init({
    	headerclass: "mypets", //Shared CSS class name of headers group
    	contentclass: "thepet", //Shared CSS class name of contents group
    	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover"
    	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
    	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content.
    	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    	animatedefault: false, //Should contents open by default be animated into view?
    	persiststate: true, //persist state of opened contents within browser session?
    	toggleclass: ["", "openpet"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    	togglehtml: ["none", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
    	animatespeed: "fast", //speed of animation: "fast", "normal", or "slow"
    	oninit:function(expandedindices){ //custom code to run when headers have initalized
    		//do nothing
    	},
    	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    		//do nothing
    	}
    })
    
    //Initialize 2nd demo:
    ddaccordion.init({
    	headerclass: "technology", //Shared CSS class name of headers group
    	contentclass: "thelanguage", //Shared CSS class name of contents group
    	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover"
    	collapseprev: false, //Collapse previous content (so only one open at any time)? true/false 
    	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content.
    	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    	animatedefault: false, //Should contents open by default be animated into view?
    	persiststate: false, //persist state of opened contents within browser session?
    	toggleclass: ["closedlanguage", "openlanguage"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    	togglehtml: ["prefix", "<img src='http://i13.tinypic.com/80mxwlz.gif' /> ", "<img src='http://i18.tinypic.com/6tpc4td.gif' /> "], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
    	animatespeed: "fast", //speed of animation: "fast", "normal", or "slow"
    	oninit:function(expandedindices){ //custom code to run when headers have initalized
    		//do nothing
    	},
    	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    		//do nothing
    	}
    })
    
    </script>
    
    </head>
    
    <body>
    <div id="wrapper">
    <img border="0" src="./images/e_books_3.gif" width="850" height="125" alt="E-Books 4U"/>
    
    
    
    
    <h2>Frequently Asked Questions</h2>
    <div id="help">
    
    
    
    
    <h3 class="mypets">Do I need special software or hardware to read eBooks?</h3>
    <div class="thepet">
    <p>
    All you need is your PC, laptop or hand held device and the free Reader 
    software.&nbsp; We offer eBooks in three different formats; Microsoft, Mobipocket and Adobe, and each has it's own Reader 
    software.&nbsp; We will provide you with a link to download the appropriate 
    Reader software free of charge when you make a purchase.
    </p>
    </div>
    
    <h3 class="mypets">Which format should I choose?</h3>
    <div class="thepet">
    <p>
    That depends on your Operating System and if you would like to read
    your eBooks on your PC or on a hand held device.&nbsp; For advice on selecting 
    the correct format for your requirements.
    </p>
    </div>
    
    <h3 class="mypets">Why do I have to Activate my Reader, and how do I Activate?</h3>
    <div class="thepet">
    <p>
    In order to read secure Microsoft and Adobe format eBooks, you need to Activate your Reader software prior to downloading.
    The process of Activating identifies you as the rightful owner of the eBook and is a security measure to protect the copyright
    of the eBook.
    </p>
    </div>
    
    <h3 class="mypets">Can I download eBooks onto my hand held device?</h3>
    <div class="thepet">
    <p>
    In most cases, yes.  This does depend on which operating system your hand held device is running however, as different
    eBook formats are compatible with different operating systems.  For detailed information on which eBook formats are
    compatible with your hand held device.
    </p>
    </div>
    
    
    <h3 class="mypets">Once I have purchased my eBook, will it always be available?</h3>
    <div class="thepet">
    <p>
    Yes, once you have purchased the eBook it is yours.&nbsp; The title is stored on 
    your eBooks.com account and you can access it at any time by logging in with 
    your username and password.&nbsp; Most formats allow you to download the title 
    as many times as you like however, Adobe format eBooks have a license which enables you to download
    three times.&nbsp; If you need to download your eBook again and you are receiving an error message indicating that 
    you have used all of your licenses, please contact our Support Staff who will be happy to reset this license for you.
    </p>
    </div>
    
    <h3 class="mypets">How do I get help if I have a problem?</h3>
    <div class="thepet">
    <p>
    You will find vast amounts advice and troubleshooting information on eBooks.com.&nbsp; 
    Our Help pages are interactive therefore, they will provide you with information 
    that is customized to your specific problem and Reader format.&nbsp; If you are 
    not able to find a solution to your problem in our Help pages, our 
    friendly Support Staff are on hand to assist you and, will always try to 
    respond to your request within 24 hours.
    </p>
    </div>
    
    <h3 class="mypets">What are the benefits of reading eBooks?</h3>
    <div class="thepet">
    <p>
    <ul>
    <li>In most cases, eBooks are cheaper than paper books. </li>
    <li>Instantly available worldwide - just download the eBook instead	of waiting for &quot;snail mail&quot; or local release.</li>
    <li>Full Text Search available - Search our entire database of eBooks for a specific phrase or keyword.</li>
    <li>Convenient - imagine loading several novels and a few magazines
    onto a portable reading device before you go on holiday. </li>
    <li>Quick to download - the average novel takes only 3-4 minutes.</li>
    <li>You can build a whole library of digital books. </li>
    <li>Users can do research and create or organize content. </li>
    <li>eBook reading software is free and easy to download from the internet.</li>
    </ul>
    </p>
    </div>
    
    <h3 class="mypets">What currency are the e-Books4U prices in?</h3>
    <div class="thepet">
    <p>
    All the prices on the e-Books4U website are in UK Pounds.
    </p>
    </div>
    
    <h3 class="mypets">I'm an Author, how can I make my book available on e-Books4U?</h3>
    <div class="thepet">
    <p>
    e-Books4U deals with Authors and potential piblications through the parent company Hawkesley Publishing Solutions. 
    For more information and to register as an Author check out&nbsp;<a href="http://www.authorbank.com">Author Registration.</a>
    </p>
    </div>
    
    <h3 class="mypets">What is your refund policy?</h3>
    <div class="thepet">
    <p>
    Refunds will be given at the discretion of the Company Management.
    </p>
    </div>
    
    
    </div>
    <div class="clearfloats">
    </div><!--end content area-->
    
    
    
    <?php // Include the HTML footer.
    include ('./reg/includes/footer.html');
    ?>

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Make sure the reference to the jQuery library is correct: includes/jquery-1.2.6.pack.js
    DD Admin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •