Hi All,
I need to make my carousel work like page list,I tried a lot but couldnt get it.I have noted my code as well.
Thanks in advance.
var sources = [
{id: 1, src: “assets/img/full-width/1.jpg”},
{id: 2, src: “assets/img/full-width/2.jpg”},
{id: 3, src: “assets/img/full-width/3.jpg”},
{id: 4, src: “assets/img/full-width/4.jpg”},
{id: 5, src: “assets/img/full-width/5.jpg”}, ]
function custome_tpl(obj){
var html = '<div class="appWrapperP">';
html += '<div class="appWrapperP">';
html += '<div class="content">';
html += '<img src="'+obj.src+'" width="462px" height="275px" border="0" style="margin:8px 8px 15px 8px" /></div>';
html += '</div>';
html += '</div>';
html += '</div>';
return html;
}
dhx.ready(function() {
dhx.env.mobile = true;
dhx.env.touch = true;
dhx.ui.fullScreen();
dhx.ui({
view: "multiview",
cols: [{
view: "carousel",
id: "carousel",
//scrollTo('100);
cols: [
{
data: sources,
datatype:"json",
template: custome_tpl,
// for (i = 0; i < 5; i++){
//template: custome_tpl,
//},
//scroll:true,
}
],
panel: false,
},
]
});
});