| Name | Size | Mode | Actions |
|---|---|---|---|
| assets/ | - | 0755 | rm |
| json/ | - | 0755 | rm |
| autoHeight.html | 12664 | 0644 | editdlrm |
| click.html | 13422 | 0644 | editdlrm |
| custom.html | 14856 | 0644 | editdlrm |
| customJson.html | 11748 | 0644 | editdlrm |
| full.html | 11663 | 0644 | editdlrm |
| images.html | 11928 | 0644 | editdlrm |
| itemsCustom.html | 13885 | 0644 | editdlrm |
| json.html | 12178 | 0644 | editdlrm |
| lazyLoad.html | 14305 | 0644 | editdlrm |
| manipulations.html | 15951 | 0644 | editdlrm |
| navOnTop.html | 13740 | 0644 | editdlrm |
| navOnTop2.html | 11907 | 0644 | editdlrm |
| one.html | 11375 | 0644 | editdlrm |
| owlStatus.html | 15792 | 0644 | editdlrm |
| progressBar.html | 14865 | 0644 | editdlrm |
| randomOrder.html | 14583 | 0644 | editdlrm |
| scaleup.html | 11776 | 0644 | editdlrm |
| sync.html | 20101 | 0644 | editdlrm |
| transitions.html | 13016 | 0644 | editdlrm |
/var/www/clients/client1/web2/web/latynfusion/js/owl.carousel/demos/customJson.html (11748B)
This example uses custom structure of JSON file customData.json.
$(document).ready(function() {
$("#owl-demo").owlCarousel({
jsonPath : 'json/customData.json',
jsonSuccess : customDataSuccess
});
function customDataSuccess(data){
var content = "";
for(var i in data["items"]){
var img = data["items"][i].img;
var alt = data["items"][i].alt;
content += "<img src=\"" +img+ "\" alt=\"" +alt+ "\">"
}
$("#owl-demo").html(content);
}
});
<div id="owl-demo" class="owl-carousel"> </div>
#owl-demo .item{
background: #a1def8;
padding: 30px 0px;
display: block;
margin: 5px;
color: #FFF;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
text-align: center;
}
{
"items" : [
{
"img": "assets/owl1.jpg",
"alt" : "Owl Image 1"
},
{
"img": "assets/owl2.jpg",
"alt" : "Owl Image 2"
},
{
"img": "assets/owl3.jpg",
"alt" : "Owl Image 1"
},
{
"img": "assets/owl4.jpg",
"alt" : "Owl Image 2"
},
{
"img": "assets/owl5.jpg",
"alt" : "Owl Image 1"
},
{
"img": "assets/owl6.jpg",
"alt" : "Owl Image 2"
}
]
}