Layui data table page loading animation, self-definition loading animation, "Loading ..."

Source: Internet
Author: User
Recording ideas, for reference only

After the table render is finished, the paging dynamic plus click event is given in the done callback function.

Close the "load ..." animation is also closed in the done callback function

This is my idea of realization, record for everyone reference.

  , done: function (res, curr, count) {        // 添加分页加载动画的函数            $(‘.layui-laypage > a‘).each(function(){            $(this).attr(‘onclick‘,"pageLoading(this)");        })        top.layer.close(loadingIndex); // 渲染完成后关闭动画    }/** * 分页请求的loading动画 * @param {当前点击的dom} that  */function pageLoading(that){   var disa = $(that).hasClass(‘layui-disabled‘);   if(disa){ // 如果是最后一页或者是只有一页,那就不可点击       return false;   }   loadingIndex = pageCommon.layerLoad(true); // 打开加载中动画}

Layui data table page loading animation, self-definition loading animation, "Loading ..."

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.