$(document).ready(function() {
var $range = $(".range_slider"),
$min = $(".min-price"),
$max = $(".max-price"),
ionValues = function(data) {
$min.text(data.from + ' руб.');
$max.text(data.to + ' руб');
}
$range.ionRangeSlider({
type: "double",
min: 10000,
max: 10000000,
from: 26000,
to: 900000,
hide_from_to: true,
onStart: ionValues,
onChange: ionValues
});
});
$('#filter').on('input', function() {
$('#ffilter').val($(this).val());
});
$('#ffilter').on('input', function() {
$('#filter').val($(this).val());
});
//Запрос к dle пост в новость с id 1
$result = $db->query("SELECT * FROM ` dle_post` WHERE `id` = 1");
//Проводим через цикл
while ($row = mysqli_fetch_array($result , true)) {
$arr[] = $row;
}
$infodop = $arr[0]['xfields']; //Получаем все значения доп полей
$infodop = explode('||', $infodop); //Разделяем тем самым делаем массив
foreach ($infodop as $key => $value) {
$filist[] = explode("|", $value); //Еще делим
}
foreach ($filist as $key => $value) {
$xflist[$value[0]] = $value[1]; //Тут определяем массив[название поля][значение поля]
}
$('.coll').on('click', function () {
$('.zind').removeClass('zind');
$(this).parent('div').addClass('zind');
})
$("body").on("change", "#punpun_filter", function() {
$("body").on("click", "#vasha_knopka", function() {
$("body").on("click", "#bottom-nav", function() {
$idNewsArray = explode(',' , $row['pay_news']);
$countNews = count($idNewsArray );
echo $countNews;
$n = 10;
$var1 = 1;
$var3 = 1;
$var5 = 1;
$sum = 0;
for ($i=1; $i <= $n; $i++){
if (isset(${"var$i"}))
{
$sum += ${"var$i"};
}
}
echo $sum; // 3
$vars = [];
$zwvola = 1;
$wuvola = 1;
$zwvola = 1; // дубликат
$duvola = 1;
$wdvola = 1;
foreach (get_defined_vars() as $name => $value)
{
if (is_int($value)){
$vars[$name] = $value;
}
}
echo array_sum($vars); // 4
var timeout = 5000;
var owl = $('.right_content .slider .owl-carousel').owlCarousel({
items: 1,
dots: true,
nav: false,
loop:true,
autoplay: true,
autoplayTimeout: timeout,
dotsContainer: '#owldots',
onChanged: function () {
$(function() {
var loader = $('.right_content .slider .owl-dot.active .loader').ClassyLoader({
width: 60,
height: 60,
percentage: 100,
speed: 20,
animate: true,
showRemaining: false,
showText: false,
diameter: 20,
lineColor: 'rgba(245,206,12,1)',
lineWidth: 2
});
})
}
});
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.classyloader.min.js"></script>
<div class="slider">
<div class="owl-carousel">
<div class="slide">
слайд 1
</div>
<div class="slide">
слайд 2
</div>
</div>
<div class="owl-dots" id="owldots">
<div class="owl-dot"><canvas class="loader"></canvas><span></span></div>
<div class="owl-dot"><canvas class="loader"></canvas><span></span></div>
<div class="owl-dot"><canvas class="loader"></canvas><span></span></div>
<div class="owl-dot"><canvas class="loader"></canvas><span></span></div>
<div class="owl-dot"><canvas class="loader"></canvas><span></span></div>
<div class="owl-dot"><canvas class="loader"></canvas><span></span></div>
</div>
</div>
.owl-dots {
position: absolute;
right: 50px;
top:250px;
z-index: 20;
.owl-dot {
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
margin-bottom: 20px;
position: relative;
cursor: pointer;
span {
position: relative;
top: 15px;
left: 16px;
}
canvas {
display: none;
position: absolute;
left: -9px;
top: -10px;
}
&.active canvas {
display: block;
}
&:hover,
&.active {
span {
background: #fdcf09;
}
}
span {
width: 10px;
height: 10px;
display: block;
border-radius: 50%;
background: #00a651;
}
}
}