Jump to content

Show more on Manufacturer description


Recommended Posts

Hi,

I would like to add a SHOW MORE button after I truncate the full description so it shows all the text.

I actually use this code in my manufacturer.tpl

  <div class="desc">
{if strlen($manufacturer->description) > 200}
    <p id="manufacturer_description" >{$manufacturer->description|truncate:200}</p>
    <a href="#" onclick="$('#manufacturer_description').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a>
  </div>
{/if}

It does truncate as I want and it does show a MORE button. Yet, when I click on it, the MORE button disappear and that's it, I do not see the full description.

Any help would be appreciated!

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...