有人知道如何在Galereya中为单个图像指定多个类别吗?
我在页面上有这个带有jQuery脚本的HTML:
<body class="royal_preloader">
<div id="royal_preloader"></div>
<div class="HeaderArea" id="headerArea">My title area etc</div>
<div id="gallery"></div>
<footer>
Galereya
</footer>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.9.1.min.js"><\/script>')</script>
<script src="src/js/jquery.galereya.js"></script>
<script>
$(function() {
$('#gallery').galereya({
spacing: 16,
load: function(next) {
$.getJSON('images.json', function(data) {
next(data);
});
}
});
});
</script>
</body>
然后我在JSON文件中有这个
[{"lowsrc":"upload\/thumbnails\/image-1.jpg","fullsrc":"upload\/image-1.jpg","description":"Description text","category":"drawing" },
{"lowsrc":"upload\/thumbnails\/image-2.jpg","fullsrc":"upload\/image-2.jpg","description":"Description text","category":"photography"},
{"lowsrc":"upload\/thumbnails\/image-3.jpg","fullsrc":"upload\/image-3.jpg","description":"Description text","category":"drawing”}]
我想要的是:
{"lowsrc":"upload\/thumbnails\/image-3.jpg","fullsrc":"upload\/image-3.jpg","description":"Description text","category":"drawing” "painting" "sketch"}
因此,当用户选择这三个类别中的任何一个时,图像将显示在所选类别中。
1张图片,几个类别。
谢谢,期待一些帮助。