force.jump()
Doing jumps on the page are easier than every.
By the way, this page runs with the force.jump() function.
You can play around with the different easing functions, duration and jump cache mode.
To automatically detect hash links on your page, just use the force.bindHashes() function like this.
force.bindHashes();
But if you want to do it by yourself, use the force.jump() function.
var element = document.getElementBy('element-id');
// jump by object
force.jump(element);
// jump by selector
force.jump('#element-id');
You can use the function with additional options.
force.jump(target);
var options = {
setHash: false
// if set to TRUE, it sets the hash/id value of the element in the URL
duration: 500,
done: function() {},
easing: 'easeInQuad',
};
force.jump(target, options);
Or the jQuery extention.
$('#ball').jump();
//$('#ball').jump(options);