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

miusov,
<!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() { var min,max;
$('.price').text(function(i,t) {
t = +t.replace(/\D/g,'');
(!min|| t < min)&&(min=t);
(!max|| t > max)&&(max=t);
})
alert([min,max])
});
  </script>
</head>

<body>
<div class="price">2000 грн</div>
<div class="price">1000 грн</div>
<div class="price">3000 грн</div>
<div class="price">5000 грн</div>



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