jQuery.Pjax

码农软件 · 软件分类 · Pjax相关项目 · 2019-03-08 19:59:28

软件介绍

pushState + ajax = pjax

jQuery的Pjax插件,Pjax即pushState + Ajax,是实现无刷新ajax加载并解决浏览器前进和后退问题的一个开源实现。

pjax 示例代码:

$.pjax({
  url: '/authors',
  container: '#main'
})

而 ajax 的做法:

$.ajax({
  url: '/authors',
  dataType: 'html',
  beforeSend: function(xhr){
    xhr.setRequestHeader('X-PJAX', 'true')
  },
  success: function(data){
    $('#main').html(data)
    history.pushState(null, $(data).filter('title').text(), '/authors')
  })
})

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

CSS3 For Web Designers

CSS3 For Web Designers

Dan Cederholm / Happy Cog / 2010-11 / $18

From advanced selectors to generated content to the triumphant return of web fonts, and from gradients, shadows, and rounded corners to full-blown animations, CSS3 is a universe of creative possibilit......一起来看看 《CSS3 For Web Designers》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

MD5 加密
MD5 加密

MD5 加密工具