We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28120
    • 380 Posts
    Sounds good but will it split a word? I might need to add a check to split at the nearest space or even full stop?
      • 3749
      • 24,544 Posts
      Since you probably want to hide the "read more" when you show the hidden part, you probably want to put both in span tags so your HTML will be good. Then your OnClick function will use JS to hide one and show the other by changing their classes. That's faster than changing their styles.


      <p>Some teaser here <span id="readmore" class="visible"> Read More ... </span> <span id="hiddenContent class="hidden"> Reset of the stuff here</span></p>
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting