Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A lightweight html5 history library for ender.js

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
Octocat-spinner-32 arbiter.js
Octocat-spinner-32 arbiter.min.js
Octocat-spinner-32 build.js
Octocat-spinner-32 license.txt
Octocat-spinner-32 package.json
README.md

be the arbiter of your history

Arbiter is a super-lightweight enhancement library for your html5 apps. This isn’t a catch-all-own-the-world solution like History.js by balupton

usage

DO NOT USE. This project is not maintained.

To be used with ender and being dependent upon a dom utility, event, and ajax libs, it’s as simple as calling the $.change function with the path you’d like to load.

Basic usage

$('body').delegate('#slider a', 'click', function (e) {
  e.stop()
  $.change(this.href)
})

Set your own success callback and animation

$('body').delegate('#slider a', 'click', function (e) {
  e.stop()
  $.change(this.href, function (data) {
    // do cool animation stuff here
  })
})

Set ajax method and type

$('body').delegate('#slider a', 'click', function (e) {
  e.stop()
  $.change(this.href, { method: 'POST', type: 'json', function (data) {
    // do yo’ thang with json
  })
})

todo

  • Test reverse callbacks (for history.back())
  • Clean up code
  • Write tests
  • Test browsers
  • Eat a doughnut
Something went wrong with that request. Please try again.