Jump to content

Categories description show twice and show/hide doesn't work


Recommended Posts

Hi everyone,

 

I hope somebody can help me. The problem is that the category's description is showing twice every when it is longer than 480 characters. And where I cannot click on show or hide. 

 

I'm new at this stuff, so I a little bit lost. My Shop's URL is http://www.napatclothing.com/en/34-thai-fisherman-pants and I'm using a free template from devilthemes.

 

This is what I have at category.tpl:

 

 

{if strlen($category->description) > 480}
<p class="cat_desc clearfix" id="category_description_short">
{$category->description|truncate:480} 
<span onclick="$('#category_description_short').hide(); $('#category_description_full').show();" class="lnk_more_cat">
{l s='More'} 
</span>
</p>
<p class="cat_desc clearfix" id="category_description_full" style="display:none;">{$category->description}<span onclick="$('#category_description_short').show(); $('#category_description_full').hide();" class="lnk_more_cat close_cat">{l s='Hide'} </span></p>
{else}
<p class="cat_desc clearfix">{$category->description}</p>
{/if}
 
If somebody can help would be great.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...