Results 1 to 6 of 6

Thread: Accordion Script

  1. #1
    Join Date
    Jul 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordion Script

    1) Script Title: Glossy Accordion Menu

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

    3) Describe problem:

    Hello,

    Hoping someone can help me with this.

    Here is the homepage of the site I am making: http://one.brettstatman.com/RFD/Home.php

    When you click on 'About Us' and then Our Doctors, the accordion does not stay open on the Our Doctors Page. When you click on 'About Us' and the Our Staff, the accordion does. I have a different call for these pages (compared to the other pages) to open the accordion. I have no idea why the accordion stays open on the Staff page, and NOT on the Our Doctors page.

    Any help would be greatly appreciated.

    Thanks

  2. #2
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    the about us link doesn't go anywhere...
    Last edited by jscheuer1; 07-18-2012 at 03:40 AM. Reason: Format
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  3. #3
    Join Date
    Jul 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You click on 'About Us' to get the drop down...then click on 'Our Doctors' / 'Our Staff'
    Last edited by jscheuer1; 07-18-2012 at 03:40 AM. Reason: Format

  4. #4
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by moephish View Post
    You click on 'About Us' to get the drop down...then click on 'Our Doctors' / 'Our Staff'
    I'm not getting any dropdown on chrome.
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  5. #5
    Join Date
    Jul 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by bernie1227 View Post
    I'm not getting any dropdown on chrome.
    Really? I haven't had any browser compatibility issues. I have chrome and it works just fine: .

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Is there an echo in here? Why are you folks quoting everything the person before says? You don't need to. Instead of hitting the 'Quote' button, try using the 'Post Reply' button.

    The only reason to quote is if there's some reason it might be unclear what you're responding to, or if you want to edit the quote to point out a particular phrase, bit of code, etc., that you are particularly responding to.

    Anyways, the page that's not working has extra code on it that the page that is working does not:

    HTML Code:
    <span class="showMobile">
    <div id="mobContainer">
    <div id="mobHead">
    	<center><img src="IMAGES/logo.png" style="margin-top: 4px;" /></center>
    </div>
    <center>
    <div id="mobNav">
    	<div id="nav_box">
            	<div class="glossymenu">
    	<a class="menuitem"  href="Home.php">Home</a>
    	<a class="menuitem submenuheader" id="highlighted" href="#" >About Us</a>
    		<div class="submenu">
    			<ul>
                    <li><a href="OurDoctors.php#goContent">> &nbsp; &nbsp;  Our Doctors  &nbsp; &nbsp;  < </a></li>
                    <li><a href="Staff.php#goContent">Our Staff</a></li>
                   
                </ul>
    		</div>
        <a class="menuitem" href="CosmeticDentistry.php#goContent">Cosmetic Dentistry</a>
    	<a class="menuitem" href="GeneralDentistry.php#goContent">General Dentistry</a>
    
    	<a class="menuitem" href="Technology.php#goContent">Technology</a>
    	<a class="menuitem submenuheader" href="#">Patient Information</a>
    		<div class="submenu">
    			<ul>
                    <li><a href="#">Education</a></li>
                    <li><a href="#">Forms</a></li>              
                </ul>
    		</div>
    	<a class="menuitem" href="FAQ.php#goContent">FAQ's</a>
    	<a class="menuitem" href="Contact.php#goContent" style="border-bottom-width: 0">Contact</a>		
    </div>
    		</div>
            
            
    </div>
    </div>
    </center>
    </span>
    This comes before the actual visible menu code and pushes the contentindex assigned by the script up to 2c for the dropdown you want opened.

    So you can either remove the above code from the page that's not working. And that will take care of it.


    Or keep the code and add it to the one that is working. If you add it to the one that is working, place it before the visible menu, just as it is on the page that's not working. You will need to then also edit the one.brettstatman.com/RFD/loadingScripts.js file here (change highlighted and red):

    Code:
    function loadAccordionOpen() {
    ddaccordion.init({
    	headerclass: "submenuheader", //Shared CSS class name of headers group
    	contentclass: "submenu", //Shared CSS class name of contents group
    	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
    	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
    	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
    	defaultexpanded: [2], //index of content(s) open by default [index1, index2, etc] [] denotes no content
    	onemustopen: true, //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: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    	togglehtml: ["suffix", "<img src='IMAGES/plus.gif' class='statusicon' />", "<img src='IMAGES/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
    	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
    	oninit:function(headers, 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
    	}
    })
    
    
    }
    function loadAccordion() {
    ddaccordion.init({
    	headerclass: "submenuheader", //Shared CSS class name of headers group
    	contentclass: "submenu", //Shared CSS class name of contents group
    	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
    	mouseoverdelay: 200, //if revealtype="m . . .
    The browser cache may need to be cleared and/or the page refreshed to see changes.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •