Please note that this is pre-release sofware and does not reflect the final quality of the product as it may contain bugs, be missing features and have other problems.
Getting started with Anchor couldn't be easier, all it requires is to include the script in your head link so...
And then initialise Anchor with this line of code...
var anchor = new Anchor();
You can also set global options to override the default behaviour of Anchor. These can be passed in to the initializer as an object. The options available are as follows...
|debugger||boolean||false||Enables/disables the debugger.|
|silenced||boolean||false||Enables/disables the functions being immediatly executed on the hashchange event.|
Get the current anchor link.
Set the current anchor link.
anchor.set(anchor, parameters, silenced);
|anchor||string||undefined||The anchor you wish to set.|
|parameters||array||undefined||The parameters you wish to send with the anchor.|
Create an event to respond to a certain anchor.
|anchor||string||undefined||The anchor you wish to interact with.|
|event||function||undefined||The event you want to occur when the anchor is visited.|
This function supports multple events, to create more simply chain call this function or call it again with the same anchor and it will be queued.
Subscribe to Nathaniel Blackburn
Get the latest posts delivered right to your inbox