I have successfully implemented a button feature that expands the Read More section on my website.
// CODE FOR EXPANDING READ MORE SECTION
$("#readMoreDiary").on("click", function(){
$("#diary-content").addClass("showTextThree");
$("#readMoreDiary").addClass("hide");
$("#closeDiary").removeClass("hideExitDiary");
$(".showTextThree").addClass("animated fadeIn");
$(".showTextThree").one("animationend",function(){
$(this).removeClass("animated fadeIn");
});
});
When navigating back from page2.php to the index page, I want the "Read more" section to remain open. (page2.php will be accessed from the Read More section.)
If a visitor who is viewing the Extended Read More section clicks a link to go to page2 and then returns, I would like them to return to the index page with the Read More Section extended.
How can I achieve this functionality?