PDA

View Full Version : Accordian Content Script problem



asoekaya
07-08-2008, 02:14 PM
1) Script Title: Accordian Content Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm

3) Describe problem:

i have ask this problem before.. but i dont get a righ answer.. sorry for asking u one moretime... i have change the default script to this


<html>
<head>
<title>{judul_situs}</title>

<script type="text/javascript" src="js/jquery-1.2.2.pack.js"></script>
<script type="text/javascript" src="js/ddaccordion.js">

/***********************************************
* Dynamic Countdown script- Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

</script>

<script type="text/javascript">
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: true, //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: true, //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='images/close.gif' /> ", "<img src='images/open.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
$(document).click(function(e){
var issubcontent=$(e.target).parents().andSelf().filter('.thelanguage').length
if (issubcontent==0)
ddaccordion.collapseall("technology")
})
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
}
})
</script>

</head>
<body>

<div class="border">

<div class="technology">Selamat Datang</div>
<div class="thelanguage"><? include "themes/auracms/mudy/selamat.php"; ?></div>

<div class="technology">Biodata Saya</div>
<div class="thelanguage"><? include "themes/auracms/mudy/biodata.php"; ?></div>

<div class="technology">Activity Now</div>
<div class="thelanguage"><? include "themes/auracms/mudy/activity.php"; ?></div>

<div class="technology">Curiculum Vitae</div>
<div class="thelanguage"><? include "themes/auracms/mudy/curiculum.php"; ?></div>

<div class="technology">Index Prestasi</div>
<div class="thelanguage"><? include "themes/auracms/mudy/prestasi.php"; ?></div>

<div class="technology">Jenjang Pendidikan Saya</div>
<div class="thelanguage"><? include "themes/auracms/mudy/pendidikan.php"; ?></div>

</div>

</body>
</html>

the red color is what was i change.. i use include script for calling that database artikel file.. i dont why if i use that script in red the problem show.. like i show u at the image (why that show double.. one in the java script and other one outside script).. and if i write the artikel in the red zone without using any script the artikel will show with no proble not show double post..

here i post to..
file what i fill into the red zone and a normal.php script where i fill the syafira.php script..

thanks for your help