Giter VIP home page Giter VIP logo

cutelink's Introduction

CuteLink - Ajaxfy your site.

What is this for?

CuteLink makes your site's links 'cute'. That means these links could be loaded faster and prettier, through some simple "ajaxfy" setups.

处理链接,实现异步的局部刷新加载,并保证浏览器location的链接可用.

工作过程:

  • 监听指定容器内所有链接的点击
  • 根据配置信息里指定的模式拼接数据接口地址
  • 根据当前的参数缓存,决定真实的请求地址和push到地址栏的地址
  • 根据数据类型决定接受到数据后的后续处理,处理方式有:
    • a. html - 更新目标容器的HTML
    • b. script - 直接执行script
    • c. json - 将json对象传给onload事件
  • 如果浏览器支持pushState,将链接的地址push过去
  • 如果不支持,拼接一个 url hashtag

cutelink's People

Contributors

ktmud avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.