我无法正确接近此问题。
我有一系列幻灯片,我想点击它们作为全屏幻灯片播放。
我有一个模特:
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制作幻灯片。有什么建议。