I\'m looking for a way to create a slide out \'show more\' feature on my responsive site, which cuts off after two lines of a paragraph.
I\'ve achie
My suggestion to solve the problem
$("#slider_desc_toogler").on( "click", function() {
$('#slider_desc_toogler > i').toggleClass('fa-arrow-circle-down')
$('#slider_desc_toogler > i').toggleClass('fa-arrow-circle-up')
if ($("#slider_desc_toogler > i").hasClass( "fa-arrow-circle-down" )) {
$(".slider_desc").css("max-height","38px");
} else $(".slider_desc").css("max-height","500px");
});
.slider_desc {
margin: 16px;
margin-top: 0px;
color: #333333;
font-family: Arial;
font-size: 14px;
line-height: 18px;
text-align: justify;
overflow: hidden;
transition: all 0.5s ease 0s;
max-height: 38px;
}
#slider_desc_toogler{
border-top: silver 1px dotted;
margin-bottom: 30px;
margin-top: 20px;
width: 70%;
margin-left: auto;
margin-right: auto;
}
#slider_desc_toogler i {
position: absolute;
text-align: center;
color: silver;
font-size: 25px;
font-family: fontawesome;
left: calc(50% - 10px);
margin-top: -13px;
background: #fff;
}