Сообщение от Ubivectel
|
не работает,
|
что не так?
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<div>
<div class="KIDE_quote">Lorem ipsum dolor sit amet.</div>
<div class="KIDE_quote">Est laboriosam ipsam numquam tempore.</div>
<div class="KIDE_quote">Quos, porro consequatur itaque at?</div>
<div class="KIDE_quote">Dolorum, quis recusandae enim minus!</div>
<div class="KIDE_quote">A, nisi odio id distinctio.</div>
<div class="KIDE_quote">Unde, explicabo amet officia placeat.</div>
<div class="KIDE_quote">Iure assumenda ad labore deserunt?</div>
<div class="KIDE_quote">Praesentium, deserunt eaque accusantium assumenda.</div>
<div class="KIDE_quote">Fuga, odio incidunt accusantium perspiciatis.</div>
<div class="KIDE_quote">Repudiandae labore eligendi perspiciatis alias?</div>
</div>
<script>
(function() {
var cut = document.getElementsByClassName('KIDE_quote');
for (var i = 0; i < cut.length; i++) {
cut[i].innerText = cut[i].innerText.slice(0, 20) + '...';
}
})();
</script>
</body>
</html>