Hey @Stolichnaya, you would need to involve custom code here, in this codepen that you posted you have all the stuff that you need, if you are not sure how to use it I will help you.
$(“#toggle”).click(function() {
var elem = $(“#toggle”).text();
if (elem == “Read More”) {
//Stuff to do when btn is in the read more state
$(“#toggle”).text(“Read Less”);
$(“#text”).slideDown();
} else {
//Stuff to do when btn is in the read less state
$(“#toggle”).text(“Read More”);
$(“#text”).slideUp();
}
});
$(document).ready(function() {
$(“#toggle”).click(function() {
var elem = $(“#toggle”).text();
if (elem == “Read More”) {
//Stuff to do when btn is in the read more state
$(“#toggle”).text(“Read Less”);
$(“#text”).slideDown();
} else {
//Stuff to do when btn is in the read less state
$(“#toggle”).text(“Read More”);
$(“#text”).slideUp();
}
});
});
@Darko I tried following these directions, can’t seem to get it working though, nothing happens when I click the ‘Read More’ button. I tried your script and @Stolichnaya’s script, in both cases nothing.
Edit: I got it working. When I copy the JavaScript directly from the Codepen linked by @Stolichnaya instead from from the forum post here, then it works… go figure.