Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Read more button expanding text

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
MarkPals98
Smarty n00b


Joined: 21 Jan 2019
Posts: 1

PostPosted: Mon Jan 21, 2019 10:08 am    Post subject: Read more button expanding text Reply with quote

I have some code that displays some text that has been retrieved from my database. I want a read more button so it displays 50 characters and then expands when you click the 'Read more' button.
This is what i have now:

Code:

<p>
 {$topicss.omschrijving|substr:0:50}
</p>

 <button id="myBtn">Read more...</button>


Can someone help me? (Ps, I'm new to working with smarty so dont hate me for being a noob pls :p )
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1530

PostPosted: Mon Jan 21, 2019 11:16 pm    Post subject: Reply with quote

That's not a Smarty problem.
Try asking around JavaScript forums.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP