Сообщение от ksa
|
Мои 5копеек...
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' />
<script src='http://code.jquery.com/jquery-latest.js'></script>
<!--
<script src="https://code.angularjs.org/1.3.9/angular.min.js"></script>
<script src="https://code.angularjs.org/1.3.9/angular-route.js"></script>
-->
<style type='text/css'>
</style>
<script type='text/javascript'>
$(function(){
$('.item > .item__status').each(function(){
$(this).find('span').parents('.item').hide();
});
});
</script>
</head>
<body>
<div class="item" data-item="666" data-item-id="8336528" data-sale="true" data-count="1">
<div class="item__status">
<span class="icon icon-lock-scratch">span_0</span>
</div>
</div>
<div class="item" data-item="689" data-item-id="8330595" data-sale="true" data-count="1">
<div class="item__status">no_span_0</div>
</div>
<div class="item" data-item="674" data-item-id="8248010" data-sale="true" data-count="1">
<div class="item__status">
<span class="icon icon-lock-scratch">span_1</span>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
</head>
<body>
<div class="item" data-item="666" data-item-id="8336528" data-sale="true" data-count="1">
<div class="item__status">
<span class="icon icon-lock-scratch">span_0</span>
</div>
</div>
<div class="item" data-item="689" data-item-id="8330595" data-sale="true" data-count="1">
<div class="item__status">no_span_0</div>
</div>
<div class="item" data-item="674" data-item-id="8248010" data-sale="true" data-count="1">
<div class="item__status">
<span class="icon icon-lock-scratch">span_1</span>
</div>
</div>
<script>
[].forEach.call( document.querySelectorAll('.item > .item__status'), function(el) {
el.querySelector('span') && (el.parentNode.style.display = "none");
});
</script>
</body>
</html>