PDA

View Full Version : Accordion Content script (v1.6) - need a little help



chndlrs
11-16-2008, 06:48 AM
Accordion Content script (v1.6)
http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm

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

http://adventuresindailyliving.blogspot.com

ddadmin
11-16-2008, 07:18 AM
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:


<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>

chndlrs
11-16-2008, 09:40 PM
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