ScrollView 基本使用示例

Class

ScrollView 基本使用示例

KISSY.use('scroll-view', function (S, ScrollView) {
    var content = '';
    for (var i = 0; i < 10; i++) {
        content += '<p>This is ' + i + ' block</p>';
    }

    var scrollView = new ScrollView({
        width: 320,
        height: 219,
        content: content,
    }).render();

    S.all('#destroy').on('click', function () {
        scrollView.destroy();
        S.all('#destroy').attr('disabled', true);
    });
});