js
Código PHP:
<script type="text/javascript">
window.addEvent('domready', function(){
new Accordion($$('.panel h3.jpane-toggler'), $$('.panel div.jpane-slider'), {
onActive: function(toggler, i) {
toggler.addClass('jpane-toggler-down');
toggler.removeClass('jpane-toggler');
},onBackground: function(toggler, i) {
toggler.addClass('jpane-toggler');
toggler.removeClass('jpane-toggler-down');
},duration:250,alwaysHide: true, display:null}); });
window.addEvent('domready', function(){
new Accordion($$('.panel2 h3.jpane2-toggler'), $$('.panel2 div.jpane2-slider'), {
onActive: function(toggler, i) {
toggler.addClass('jpane2-toggler-down');
toggler.removeClass('jpane2-toggler');
},onBackground: function(toggler, i) {
toggler.addClass('jpane2-toggler');
toggler.removeClass('jpane2-toggler-down');
},duration:250,alwaysHide: true, display:null,}); });
</script>
Código PHP:
<div class="panel">
<h3 class="jpane-toggler title" id="cpanel-panel">
<span>
Item1
</span>
</h3>
<div class="jpane-slider content">
<p>
Contenido
</p>
<div class="panel2">
<h3 class="jpane2-toggler title" id="cpanel-panel2">
<span>
Prueba
</span>
</h3>
<div class="jpane2-slider content">
Prueba
</div>
</div>
</div>
</div>