summaryrefslogtreecommitdiffstats
path: root/theme/javascript/core/navigation.js
diff options
context:
space:
mode:
Diffstat (limited to 'theme/javascript/core/navigation.js')
-rw-r--r--theme/javascript/core/navigation.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/theme/javascript/core/navigation.js b/theme/javascript/core/navigation.js
new file mode 100644
index 0000000..bb3547c
--- /dev/null
+++ b/theme/javascript/core/navigation.js
@@ -0,0 +1,17 @@
+define([
+ "jQuery"
+], function($) {
+ var goNext = function() {
+ var url = $("link[rel='next']").attr("href");
+ if (url) location.href = url;
+ };
+ var goPrev = function() {
+ var url = $("link[rel='prev']").attr("href");
+ if (url) location.href = url;
+ };
+
+ return {
+ goNext: goNext,
+ goPrev: goPrev
+ };
+}); \ No newline at end of file