backbone.js集合渲染html全屏api幻灯片放映

时间:2013-11-06 20:03:05

标签: html backbone.js fullscreen

我无法正确接近此问题。

我有一系列幻灯片,我想点击它们作为全屏幻灯片播放。

我有一个模特:

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制作幻灯片。有什么建议。

0 个答案:

没有答案