基于 jquery 的片段异步加载 jquery-fjax

码农软件 · 软件分类 · jQuery界面效果 · 2020-01-01 09:11:52

软件介绍

jquery-fjax 页面片段异步加载

  • 基于锚点技术,支持所有浏览器,不需要浏览支持 history.pushState

  • 如果支持客户浏览器都支持 history.pushState ,建议使用 pjax

  • 需要引入 jquery 库,开发版本选用的是v2.2.1,其它版本未验证

  • QQ:16349023

    <script th:src="@{${prefixPath}+'/assets/plugins/jquery-fjax/jquery.fjax.js'}" src="/assets/plugins/jquery-fjax/jquery.fjax.js"></script>
    <script  type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/
    $(function() {
        var fjax_options = {
            fragment:'#pagecontent',
            prefix:'/manage/',
            beginLoad:function () {
                console.log("begin");
            },
            endLoad:function () {
                console.log("end");
            },
            success:function () {
                console.log("success");
            },
            error:function () {
                console.log("error");
            },
            'default_url': 'main',//default hash
            'content_url': function(hash,prefix) {
                //***NOTE***
                //this is for Ace demo only, you should change it to return a valid URL
                //please refer to documentation for more info
                var hashValue=hash;
                var path = document.location.pathname;
                //var requestUrl=path + "/" +hashValue.replace(/^page\//, '');
                //var requestUrl=path + "/" +hashValue;
                console.log(prefix);
                var requestUrl=prefix+hashValue;
                console.log(requestUrl);
                return requestUrl;
            }
        }
        $('.page-content-area').fjax(fjax_options);
    });
    
    /*]]>*/
    </script>

本文地址:https://www.codercto.com/soft/d/22409.html

Facebook效应

Facebook效应

[美] 大卫·柯克帕特里克 / 沈路、梁军、崔筝 / 华文出版社 / 2010-10 / 49.80

本书作者近距离地采访了与Facebook相关的人士,其中包括Facebook的创始人、员工、投资人、意向投资人以及合作伙伴,加起来超过了130人。这是真切详实的访谈,更是超级精彩的故事。作者以其细腻的笔触,精巧的叙事结构,解密了Facebook如何从哈佛的宿舍里萌发,创始人的内讧,权力之争,如何放弃华盛顿邮报的投资,怎样争取到第一个广告客户,而第一轮融资又如何获得一亿美元的估值,让人痴迷的图片产品......一起来看看 《Facebook效应》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

html转js在线工具
html转js在线工具

html转js在线工具