Laypage front-end paging Plug-ins implement AJAX asynchronous paging _ajax related

Source: Internet
Author: User

This example for you to share the Laypage front-end paging plug-ins, Ajax asynchronous paging, get the JSON data implementation without refreshing paging for your reference, the specific content as follows

function GetList (pageIndex) {var _this = "" var clone_this = ""; _this = $ (".
      Binddatalist ");//Data listing container, Clone_this = _this.clone (true); var pageSize = 25;//The number of bars displayed per page $.ajax ({type: "Get", async:false,//asynchronous Lock, default to True URL: ".. /ashx/system/defaultajax.ashx ",//back-end processing data, returning JSON format: {" PageIndex ": PageIndex," pageSize ": PageSize,}, C Ontenttype: "Application/json;
          Charset=utf-8 ", success:function (data) {var json = eval (" + Data + ")); if (JSON.
            PageCount > 0)//data total number of bars {_this.html ("");
              for (var i = 0; i < json.rows.length i++) {var html = "<li>json data </li>";
            _this.append (HTML);
          } jsonpage (JSON, PageIndex, pageSize);
            else {_this.html ("");
          _this.append ("");
    }
        }
      }); function Jsonpage (JSON, PageIndex, Pagesize) {var coun = json. pagecount;//Total Data Bar number var PageCount = coun% PageSize = = 0? Coun/pagesize:coun/pagesize + 1;//calculates how many pages var Laypageindex = laypage ({cont: ' project_page ',//container.
        The value supports the ID name, native DOM object, and jquery object. Skin: ' #fb771f ', pages:pagecount,//The total number of pages received through the background curr:pageindex,///Initialize the current page first: ' |< ',///show the homepage as Number 1,. If not shown, set False to last: ' >| ',////The end of the page as the total number of pages. If not, set false to prev: ' < ',//If not displayed, set false to Next: ' > ',//If not shown, set false jump:function (obj,
          (a) {///Trigger paging callback if (!first) {//Click the page to trigger the function itself and pass the current page: Obj.curr Searchhottag (Obj.curr);
    }
        }
      }); }

The above is the entire content of this article, I hope to learn laypage paging plug-ins have some inspiration and help, thank you for your reading.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.