1
내 jquery를로드 할 때 축소 된 메뉴를 표시하려고합니다. 바로 지금 그것을 확장하고 있습니다. 주위를 바꾸는 가장 좋은 방법은 무엇입니까?Jquery Navigation - 축소/확장
아래 코드는 magento에 대한 계층 적 탐색입니다.
<?php if($this->canShowBlock()): ?>
<div class="block block-layered-nav">
<div class="block-title">
<strong><span class="catalog-layer-view-heading"><?php echo $this->__('BROWSE BY') ?></span></strong>
</div>
<div class="block-content">
<?php echo $this->getStateHtml() ?>
<?php if($this->canShowOptions()): ?>
<dl id="narrow-by-list">
<?php $_filters = $this->getFilters() ?>
<?php $i=0; foreach ($_filters as $_filter): $i++; ?>
<?php if($_filter->getItemsCount()): ?>
<dt id="filterlabel<?php echo $i;?>"><?php echo $this->__($_filter->getName()) ?> <span class="openthis openthis<?php echo $i;?>">(open)</span></dt>
<dd><?php echo $_filter->getHtml() ?></dd>
<script type="text/javascript" >
jQuery('#filterlabel<?php echo $i;?>').each(function(){
jQuery('.openthis<?php echo $i;?>').css({'display':'block'});
jQuery(this).toggle(function(){
jQuery(this).addClass('hided').next().slideUp(200);
jQuery('.openthis<?php echo $i;?>').css({'display':'none'});
},function(){
jQuery(this).removeClass('hided').next().slideDown(200);
jQuery('.openthis<?php echo $i;?>').css({'display':'block'});
})
});
</script>
<?php endif; ?>
<?php endforeach; ?>
</dl>
<script type="text/javascript">decorateDataList('narrow-by-list')</script>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
이것은 코드입니다. 난 단지 CSS의 기본값을 "숨기기/접기"로 변경해야합니다. –
은 CSS 변경입니까? –