一个简单的前端单页面切换路由和转场效果 使用AJAX请求html片段,操作DOM,结合CSS3实现单页面切换效果。 默认监听所有a标签的点击事件 默认不缓存页面 通过给a标签设置data-cache="true" 告知需要缓存页面 解决ajax、jsonp典型的不支持前进后退、历史记录的功能 个人主页正在使用http://shmy.github.io
shmy / route.js Goto Github PK
View Code? Open in Web Editor NEW一个简单的前端单页面切换路由和转场效果