开发者

JQueryMobile Issue with adding ScrollView to Dynamic Data

开发者 https://www.devze.com 2023-03-30 09:07 出处:网络
I am having issues with the JqueryMobile Scroll View: Here is the code below: function scroll_Info(开发者_StackOverflow社区json){

I am having issues with the JqueryMobile Scroll View:

Here is the code below:

   function scroll_Info(开发者_StackOverflow社区json){
         var scroll_Info = document.getElementById("scroll_Info");

    var dt =json.results; 
      if (dt.length <= 0){
       }

          else{         
             $('#scroll_Info').append('<ul data-scroll="x" class="double-block-view-h">');
             $('#scroll_Info').append('<ul class="view">');

      scrollview = $('#scroll_Info');

          for (var i=0; i<dt.length; i++){

        scroll_Info.innerHTML +=  "<ul align='left'><ul data-scroll='x' class='double-block-view-h'><li class='square'>1</li></ul>";
        }
 $("#scroll_Info").scrollview();

       }
    }

I am displaying this info in the ul:

 <ul id="scroll_Info"></ul> 

But it is not displaying correctly, what am I doing wrong?

0

精彩评论

暂无评论...
验证码 换一张
取 消