<div class="inf-frame-text">
<h4> Explore Tomorrow </h4>
<p> At our agency, we believe in embracing the future as an endless journey. It's not just about what's coming next, but it's about everything that lies ahead. The upcoming experiences and innovations are what drive us forward. For our clients, the road to the future is a continuum of possibilities waiting to be explored. </p>
<a class="inf-read-btn"> Read More + </a>
</div>
.inf-frame-text {
margin-top: 120px;
&:first-child {
margin-top: 0;
}
p {
height: 62px;
overflow: hidden;
transition:height 0.3s ease-out;
}
p.is-active {
height: 100%;
overflow: visible;
transition:height 0.3s ease-out;
}
.inf-read-btn {
display: block;
color:#00ffbf !important;
cursor: pointer;
}
$('.inf-read-btn').on('click', function() {
$('.inf-frame-text p').toggleClass('is-active');
});
Hi everyone! I'm looking to set up some grids with dynamic content sections. Certain parts of the content should be initially hidden, and clicking on the "read more" button should reveal all content with a smooth toggle effect. I've attempted to implement some JavaScript for this functionality, but I'm encountering some issues. Additionally, I want to ensure that when a button is clicked, only the related content is shown while hiding all other sections.