First characters from long to short description

.shortdescritption p:last-child::after {
content: "...";
margin-left: 2px;
}

 

 

<script>
var myStr = $('.basic-description').html();
var subStr = myStr.substring(0, 320);
$("<div class='shortdescritption'>"+subStr+"</div>").appendTo('.type-detail .p-info-wrapper');
$('.shortdescritption').find('h3').remove();
</script>