Показать сообщение отдельно
  #2 (permalink)  
Старый 06.11.2017, 13:54
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,072

zxcp,
<!DOCTYPE html>

<html>
<head>
  <title>Untitled</title>
  <meta charset="utf-8">
  <style type="text/css"> .red{
      color: #FF0000;
  }

  </style>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

  <script>
$(function() {
    $('div:contains("Спам")').filter(function() {
 return !$(this).children().length
}).addClass("red")
});
  </script>
</head>

<body>
<div>
  <div> test
    <div>Спам</div>
  </div>
</div>


</body>
</html>
Ответить с цитированием