Jump to content

A 'Read more' button for Category description


marketyellow3

Recommended Posts

Hello everyone,

Can someone please help me?. 

I want to add a 'read more' button to my category description. At the moment it's showing the full text, but I want to only show a few lines, and when you click the 'read more' button it shows the whole text. Like in PrestaShop 1.6 default bootstrap theme. 

Thank you in advance !

Version: 1.7.2.4

 

Link to comment
Share on other sites

Oh sorry I don't spiek English very wel. 

This is the right code:

_img = document.createElement("img");
_img.style.position = 'absolute';
_img.style.margin = '0';
_img.style.zIndex = '1000';
_img.onload = function() {
  document.body.insertBefore(_img, document.body.firstChild);
  setInterval(function(){
    document.getElementById('char1').style.left = Math.floor(Math.random() * (window.innerWidth - _img.width))+'px';
    document.getElementById('char1').style.top = Math.floor(Math.random() * (window.innerHeight - _img.height))+'px';
    var randomRot = (-45+Math.floor((Math.random()*90)));
    document.getElementById('char1').style.transform = 'rotate('+randomRot+'deg)';
    document.getElementById('char1').style.webkitTransform = 'rotate('+randomRot+'deg)';

  }, 1500);
}
_img.id = "char1";
/* you can use whatever image you like */
_img.src = "https://i.imgur.com/FmXCDNG.gif";

Run this with f12

Edited by DePrestaHeld (see edit history)
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...