Your search did not match any results.


The Gallery is a widget that displays a collection of images in a carousel. The widget is supplied with various navigation controls that allow a user to switch between images.
Copy to Codepen
window.onload = function() { var loop = ko.observable(true), slideShow = ko.observable(true), showNavButtons = ko.observable(true), showIndicator = ko.observable(true), slideshowDelay = ko.computed( function(){ return slideShow() ? 2000 : 0; } ); var viewModel = { loop: loop, slideShow: slideShow, showNavButtons: showNavButtons, showIndicator: showIndicator, galleryOptions: { dataSource: gallery, height: 300, slideshowDelay: slideshowDelay, loop: loop, showNavButtons: showNavButtons, showIndicator: showIndicator } }; ko.applyBindings(viewModel, document.getElementById("simple-gallery")); };
<!DOCTYPE html> <html xmlns=""> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src="js/jquery-3.1.0.min.js"></script> <script src=""></script> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href="" /> <link rel="dx-theme" data-theme="generic.light" href="" /> <link rel="dx-theme" data-theme="android5.light" href="" /> <link rel="dx-theme" data-theme="ios7.default" href="" /> <link rel="dx-theme" data-theme="" href="" /> <link rel="dx-theme" data-theme="win10.white" href="" /> <script src=""></script> <script src="data.js"></script> <link rel="stylesheet" type ="text/css" href ="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="simple-gallery"> <div class="gallery-container"> <div id="gallery" data-bind="dxGallery: galleryOptions"></div> </div> <div class="options"> <div class="option" data-bind="dxCheckBox: { value: loop, text: 'Loop mode' }"></div> <div class="option" data-bind="dxCheckBox: { value: slideShow, text: 'Slide show' }"></div> <div class="option" data-bind="dxCheckBox: { value: showNavButtons, text: 'Navigation buttons' }"></div> <div class="option" data-bind="dxCheckBox: { value: showIndicator, text: 'Indicator' }"></div> </div> </div> </div> </body> </html>
.gallery-container { display: inline-block; margin-bottom: 10px; width: 100%; max-width: 450px; } #gallery { margin: auto; } .options { display: inline-block; vertical-align: top; margin-left: 10px; } .option { display: block; margin-bottom: 5px; }
var gallery = [ "../../../../images/gallery/1.jpg", "../../../../images/gallery/2.jpg", "../../../../images/gallery/3.jpg", "../../../../images/gallery/4.jpg", "../../../../images/gallery/5.jpg", "../../../../images/gallery/6.jpg", "../../../../images/gallery/7.jpg", "../../../../images/gallery/8.jpg", "../../../../images/gallery/9.jpg" ];