Answer the question
In order to leave comments, you need to log in
Output photo in bxslider from msql?
Hello, tell me how to display photos in bxslider from msql
Now photos are displayed on the page like this:
<?php if ($photo_estate->num_rows > 0): ?>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-12">
<div class="row">
<?php while (list($small, $big) = mysqli_fetch_row($photo_estate)): ?>
<?php $image_count++ ?>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-4">
<a data-fancybox="gallery" href="<?= HTTP_CLIENT_WAY . 'photo/' . ($is_agency ? 'agency' : 'customers') . '/' . $_GET['id'] . '/' . $big ?>" rel="gallery">
<img src="<?= HTTP_CLIENT_WAY . 'photo/' . ($is_agency ? 'agency' : 'customers') . '/' . $_GET['id'] . '/' . $small ?>"
class="img img-responsive img-thumbnail estate-img"
alt="Фотография объекта <?= $image_count ?>"
title="<?= $full_operation ?> <?= $type ?> (<?= $id ?>), <?= $info_street ?>, Фото <?= $image_count ?>"
> </a>
</div>
<?php endwhile;?>
</div>
</div>
<?php endif ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.min.js"></script>
<script>
$(function(){
$('.bxslider').bxSlider({
mode: 'fade',
captions: true,
slideWidth: 400
});
});
</script>
<div class="bxslider">
<div> <img src="<?= HTTP_CLIENT_WAY . 'photo/' . ($is_agency ? 'agency' : 'customers') . '/' . $_GET['id'] . '/' . $big ?>"> </div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question