mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Added scrollTo animation for navigation in TW5
This commit is contained in:
parent
f381e95452
commit
ed28773178
@ -16,7 +16,11 @@ var StoryNavigator = function(navigators) {
|
||||
StoryNavigator.prototype.navigateTo = function(title) {
|
||||
var tiddlerHtml = this.navigators.store.renderTiddler("text/html","SimpleTemplate",title);
|
||||
if(tiddlerHtml) {
|
||||
$("<article/>").html(tiddlerHtml).appendTo("body");
|
||||
var article = $("<article/>").html(tiddlerHtml);
|
||||
article.appendTo("body");
|
||||
$("html,body").animate({
|
||||
scrollTop: article.offset().top
|
||||
}, 400);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user