I have a website retrieving images from database. The database has multiple records (ROWS). I am using while loop to retrieve the records. Every record having three or four imag
as per my understanding, it seems you're looking for this kind of solution.
Use of js "jquery.bxslider.js"
, required css "jquery.bxslider.css"
//assuming this is your database retrieval
$slideImage[] = "clody.jpg";
$slideImage[] = "heaven.jpg";
$slideImage[] = "park.jpg";
$slideImage[] = "pool.jpg";
$slideImage[] = "provence.jpg";
$slideStr = "";
//utlize while loop if required
foreach($slideImage as $indKey=>$indSlideImg) {
$slideStr .= '';
}
here in the above loop we created a sliding string, which we are going to utilize that into our slider.
here comes the javascript
$(document).ready(function(){
$('.slider1').bxSlider({
slideWidth: 200,
minSlides: 2,
maxSlides: 3,
slideMargin: 10
});
});
hope it is helpful.