Results 1 to 3 of 3

Thread: Accordion Content script (v1.6) - need a little help

  1. #1
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Accordion Content script (v1.6) - need a little help

    Accordion Content script (v1.6)
    http://www.dynamicdrive.com/dynamici...daccordion.htm

    I have installed it per instructions and can not get it to function. Any advice?

    http://adventuresindailyliving.blogspot.com

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

    Default

    There are other JavaScript errors on your page coming from other pages. Most likely they are throwing off the rest of the scripts' execution on that same page. You can browse your page using Firefox and go to "Tools"->"Error Console" to see those errors.

    If I take out just the Accordion script on your page and put it on its own page, it works:

    Code:
    <script src='http://www.suzannechandler.com/blogscripts/jquery-1.2.6.pack.js' type='text/javascript'></script>
    <script src='http://www.suzannechandler.com/blogscripts/ddaccordion.js' type='text/javascript'>
    
    /***********************************************
    * 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
    ***********************************************/
    </script>
    <style type='text/css'>
    .accordion{
    cursor: hand;
    cursor: pointer;
    padding: 2px 5px;
    }
    .open{ /*class added to contents when it is open*/
    background: $greycolor1;
    }
    </style>
    <script type='text/javascript'>
    ddaccordion.init({
    	headerclass: "accordion",
    	contentclass: "item",
    	revealtype: "mouseover",
    	mouseoverdelay: 100,
    	collapseprev: true, 
    	defaultexpanded: [ ], 
    	onemustopen: false, 
    	animatedefault: false, 
    	persiststate: true, 
    	toggleclass: ["", "open"], 
    	togglehtml: ["none", "",""], 
    	animatespeed: "fast", 
    	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>
    
    
    <body>
    
    <h3 class="accordion">recent tweets</h3>
    
    <div class="item">
    twitter here
    </div>
    
    <h3 class="accordion">recent posts</h3>
    <div class="item">
    recent posts here
    </div>
    
    <h3 class="accordion">recent comments</h3>
    <div class="item">
    recent comments here
    </div>
    
    <h3 class="accordion">recent books</h3>
    
    <div class="item">
    books widget here
    </div>
    </div>
    DD Admin

  3. #3
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you

    That helped a lot. I used NoScript to block each script one by one until I found the one that was throwing it off. It was google.code. Now I have to figure out which widget contains google.code and get rid of it.

    Best,

    Suzanne

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
  •