Möchte gerne, dass die Kommentare im aktiven Tab dargestellt werden. Jedoch ist die Ausgabe der Kommentare bei aktivierten Tab, deaktiviert. Was mache ich hier falsch?
PHP-Code:
<div class="single-bottom">
<div class="ce_tabs">
<div class="tabs classic tabs_<?php echo $this->id; ?>">
<ul>
<li><a>Austattung</a></li>
<li><a>Beschreibung</a></li>
<li><a>Sonstiges</a></li>
</ul>
</div>
<div class="panes panes_<?php echo $this->id; ?>">
<div class="section active">
<h3>Austattung</h3>
<div class="single-features"><?php echo $this->field('features')->html(); ?></div>
</div>
<div class="section">
<h3>Beschreibung</h3>
<div class="single-desc"><?php echo $this->field('description')->html(); ?>
</div>
<div class="section">
<h3>Sonstiges</h3>
--> ab hier <div class="single-desc-add">
<?php foreach($this->entries as $entry): ?>
<?php // Comments object for the entry
$objComments = $entry->getComments(); ?>
<h3><?php // headline
echo $objComments->headline; ?></h3>
<?php // render comments
echo implode('',$objComments->comments); ?>
<?php // render comments form
echo $entry->getCommentForm('mod_comment_form'); ?>
<?php // render the comments pagination
echo $objComments->pagination; ?>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<!--{{insert_form::19}}
<?php echo $this->field('geo_data')->html(); ?>-->
</div>
</div>
</div>
<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function(){
jQuery(".tabs_<?php echo $this->id; ?> li:first").addClass('active');
jQuery(".tabs_<?php echo $this->id; ?> li").click(function(e){
if (!jQuery(this).hasClass("active")) {
var tabNum = jQuery(this).index();
var nthChild = tabNum+1;
jQuery(".tabs_<?php echo $this->id; ?> li.active").removeClass("active");
jQuery(this).addClass("active");
jQuery(".panes_<?php echo $this->id; ?> div.active").removeClass("active");
jQuery(".panes_<?php echo $this->id; ?> div:nth-child("+nthChild+")").addClass("active");
}
});
});
/* ]]> */
</script>
Kommentar