Skip to content

Instantly share code, notes, and snippets.

@svaustin66
Last active December 15, 2017 16:55
Show Gist options
  • Save svaustin66/48b8215dc918fe1538c2af2942c2b47c to your computer and use it in GitHub Desktop.
Save svaustin66/48b8215dc918fe1538c2af2942c2b47c to your computer and use it in GitHub Desktop.
HTML for Liquid Template for Show More/Less
{% if product.description.size > 700 %}
<div class="product-description-short">
{{ product.description | truncate: 500, ". . . " }}<a class="readmore" href="#">Show More &#62;</a>
</div>
<div class="product-description-full">
{{ product.description }}
<br><a class="readless" href="#">&#60; Show Less</a>
</div>
{% else %}
{{ product.description }}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment