我无法正确处理这个问题。
我有一组幻灯片,我想单击以将它们作为全屏幻灯片播放。
我有一个模型:
var Slide = Backbone.Model.extend({
defaults: {
title: "",
header: "Slide Header",
content: "Paragraph"
},
...
});
一个集合:
var SlidesCollection = Backbone.Collection.extend({});
和一个观点:
var SlideshowView = Backbone.View.extend({});
我将幻灯片添加到集合中,并通过其他地方的下划线模板呈现它们。
var slides = [{title :"this is the first slide",
header :"this is the first header",
content:"this is finally the content"
},
{title :"this is the second slide",
header :"this is the second header",
content:"this is second the content"
}];
var sc = new SlidesCollection();
sc.add(slides);
我不确定如何利用 html 全屏 api 制作幻灯片。有什么建议么。