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

daslex,
<!DOCTYPE html>

<html>
<head>
  <title>Untitled</title>
  <meta charset="utf-8">
  <style type="text/css">
  </style>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

  <script>
$(function() {
$(".cl").click(function(){
    $temp = $(this).attr('id');

    $(".cl").text(function(index, text) {
      return this.innerHTML.replace("&nbsp;", "SpecialChar");
    });

  });
});
  </script>
</head>

<body>
<div class="cl" id="tid1">
      DIV1 &nbsp;
    </div>

    <div class="cl" id="tid2">
      DIV2 &nbsp;
    </div>

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