Expected output:
I need first & second parapragh should be inline, which is my appropriate result.
Here what i tried in HTML:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="content2">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,</div> <div class="content1" style="display:inline"> when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. <br>
when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
<ul>
<li>when an unknown printer took a galley of type and scrambled it to make a type specimen book.</li>
<li>when an unknown printer took a galley of type and scrambled it to make a type specimen book.</li>
</ul> </div>
<a class="show_hide" data-content="toggle-text">read more...</a>
CSS:
.content1{
text-align: justify;
font-size: 16px;
font-weight: 400;
margin: 0;
line-height: 24px;
}
.content2{
text-align: justify;
font-size: 16px;
font-weight: 400;
margin: 0;
line-height: 24px;
}
.inline{
display: inline-block;
}
Javascript:
<script>
$(document).ready(function () {
$(".content1").hide();
$(".show_hide").on("click", function () {
var txt = $(".content1").is(':visible') ? 'read more...' : 'read less';
$(".show_hide").text(txt);
$(this).prev('.content1').slideToggle(200);
});
});
</scritp>
Here what i tried in Codepen: enter link description here
content1andcontent2in same line than breaking into next line?