yyy251
<div class="mui-content">
                    <ul class="mui-table-view mui-table-view-chevron">
                        <li id="switch" class="mui-table-view-cell" style="display: none;">
                        </li>
                    </ul>
                </div>

                <div id="topdata"></div>
function GetArticleList() {
        var json = {};
        json.action = "GetArticleList";
        json.count = 3;
        json.classid = 1;
        $.post(articlemsgapi, json, function (msg) {

            if (msg != "0") {

                var obj = eval("(" + msg + ")");
                var dataRow = obj.rows;
                var count = parseInt(dataRow.length);
                if (count > 0) {


                    var html = \'<div id="slider" class="mui-slider">\';

                    html += \'<div class="mui-slider-group mui-slider-loop">\'
                    html += \'<div class="mui-slider-item mui-slider-item-duplicate">\';
                    if (dataRow[dataRow.length - 1].JSON_linkurl == "#") {
                        html += \'    <a href="#">\';
                    } else {
                        html += \'    <a href="\' + dataRow[dataRow.length - 1].JSON_linkurl + \'">\';
                    }
                    html += \'        <img src="\' + dataRow[dataRow.length - 1].JSON_defaultpicurl + \'">\';
                    html += \'    </a>\';
                    html += \'</div>\';

                    $.each(dataRow, function (index, item) {

                        html += \'<div class="mui-slider-item">\';
                        if (item.JSON_linkurl == "#") {
                            html += \'    <a href="#">\';
                        } else {
                            html += \'    <a href="\' + item.JSON_linkurl + \'">\';
                        }
                        html += \'        <img src="\' + item.JSON_defaultpicurl + \'">\';
                        html += \'    </a>\';
                        html += \'</div>\';

                    });

                    html += \'<div class="mui-slider-item mui-slider-item-duplicate">\';
                    if (dataRow[0].JSON_linkurl == "#") {
                        html += \'    <a href="#">\';
                    } else {
                        html += \'    <a href="\' + dataRow[0].JSON_linkurl + \'">\';
                    }
                    html += \'        <img src="\' + dataRow[0].JSON_defaultpicurl + \'">\';
                    html += \'    </a>\';
                    html += \'</div>\';
                    html += \' </div>  \';
                    html += \' </div>  \';

                    $("#topdata").append(html);

                    mui(\'#slider\').slider({
                        interval: 3000
                    });
                }
            }
        });
    }

 

分类:

技术点:

相关文章:

  • 2021-05-28
  • 2021-07-29
  • 2021-08-19
  • 2022-12-23
  • 2021-11-19
  • 2021-11-19
  • 2021-07-08
  • 2022-12-23
猜你喜欢
  • 2021-11-19
  • 2021-11-19
  • 2021-10-21
  • 2021-11-19
  • 2021-11-19
  • 2021-11-19
  • 2021-11-19
相关资源
相似解决方案