動的に div を作成し、iscroll js を使用してスクロール バーを追加しようとしました。
しかし、私のアプリケーションでエラーが発生しました。
誰でも私を案内できますか?
// here to add scroll bar
function loaded() {
myScroll = new iScroll('wrapper', { scrollbarClass: 'myScrollbar' });
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
document.addEventListener('DOMContentLoaded', loaded, false);
// here i created a div dynamically
$results_list = $('<div id="wrapper" class="'+options.resultsClass+'" style="width:92%;height:10%;overflow:auto;position:absolute;"></div>').hide();//here i need to add scroll bar?
doIscrollRefresh();
エラーメッセージ
TypeError: Result of expression 'that.wrapper' [null] is not an object. at file:///android_asset/www1/iscroll.js:60