开发者

Galleria always says "Load failed: no data found"

Here is the html on my page

In the head:

<script type="text/javascript" src="/media/site-media/js/galleria/galleria-1.2.5.min.js"></script>
<script type="text/javascript" src="/media/site-media/js/galleria/themes/classic/galleria.classic.min.js"></script>

In the body:

<div id="gallery">
<br>
<开发者_StackOverflow中文版/div>
<script>
var galleryData = [
{image: '/media/photos/IMG_1117.JPG'},
{image: '/media/photos/IMG_1118.JPG'}
];
$('#gallery').galleria({dataSource: galleryData});
</script>

Towards the end of my page:

<script>
$('#gallery').galleria({height:1000,
                        width:800,
                        show_imagenav:true
                        });
</script>

The first question I have is what is the difference between data_source and dataSource? it seems like some questions use one, and some use the other, and I can't tell why. I think I am missing something minor, but I get a "Load failed: no data found" error always. Can someone look this over and see whats wrong? I feel like i've tried everything.


Put this at the end of the page

<script>
$('#gallery').galleria({dataSource: galleryData,
                        height:1000,
                        width:800,
                        show_imagenav:true
                        });
</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜