Created
March 9, 2011 20:40
-
-
Save jeffremer/862960 to your computer and use it in GitHub Desktop.
Scrolling Carousels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
index: function(interaction) { | |
// Create a Carousel of Items | |
var carousel1 = new Wbx.views.Carousel({ | |
defaults: { | |
cls: 'card' | |
}, | |
height: '280', | |
width: '320', | |
items: [{ | |
html: ' < h1 > Carousel < /h1><p>Navigate the two carousels on this page by swiping left/right or clicking on one side of the circle indicators below. < /p>' | |
}, | |
{ | |
title: 'Tab 2', | |
html: '2' | |
}, | |
{ | |
title: 'Tab 3', | |
html: '3' | |
}] | |
}); | |
var carousel2 = new Wbx.views.Carousel({ | |
defaults: { | |
cls: 'card' | |
}, | |
height: '280', | |
width: '320', | |
items: [{ | |
html: '<h1>Carousel</h1 > <p > Navigate the two carousels on this page by swiping left / right or clicking on one side of the circle indicators below. < /p>' | |
}, | |
{ | |
title: 'Tab 2', | |
html: '2' | |
}, | |
{ | |
title: 'Tab 3', | |
html: '3' | |
}] | |
}); | |
var carousel3 = new Wbx.views.Carousel({ | |
defaults: { | |
cls: 'card' | |
}, | |
height: '280', | |
width: '320', | |
items: [{ | |
html: '<h1>Carousel</h1 > <p > Navigate the two carousels on this page by swiping left / right or clicking on one side of the circle indicators below. < /p>' | |
}, | |
{ | |
title: 'Tab 2', | |
html: '2' | |
}, | |
{ | |
title: 'Tab 3', | |
html: '3' | |
}] | |
}); | |
var index = new Wbx.views.AbstractView({ | |
layout: { | |
type: 'vbox' | |
}, | |
items: [carousel1, carousel2, carousel3] | |
}); | |
this.renderIndex(index, interaction); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment